diff options
Diffstat (limited to 'src/zenutil')
| -rw-r--r-- | src/zenutil/include/zenutil/logging.h | 1 | ||||
| -rw-r--r-- | src/zenutil/logging.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/zenutil/include/zenutil/logging.h b/src/zenutil/include/zenutil/logging.h index d64eef207..85ddc86cd 100644 --- a/src/zenutil/include/zenutil/logging.h +++ b/src/zenutil/include/zenutil/logging.h @@ -34,6 +34,7 @@ struct LoggingOptions bool IsTest = false; bool AllowAsync = true; bool NoConsoleOutput = false; + bool QuietConsole = false; std::filesystem::path AbsLogFile; // Absolute path to main log file std::string LogId; }; diff --git a/src/zenutil/logging.cpp b/src/zenutil/logging.cpp index cb0fd6679..8ff58ee73 100644 --- a/src/zenutil/logging.cpp +++ b/src/zenutil/logging.cpp @@ -121,6 +121,10 @@ BeginInitializeLogging(const LoggingOptions& LogOptions) else { auto ConsoleSink = std::make_shared<spdlog::sinks::ansicolor_stdout_sink_mt>(); + if (LogOptions.QuietConsole) + { + ConsoleSink->set_level(spdlog::level::warn); + } Sinks.push_back(ConsoleSink); } |