diff options
| author | zousar <[email protected]> | 2023-12-07 08:48:04 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-07 08:48:04 -0700 |
| commit | 6229149482f00893afa6874cc75d5e5ed0c438a9 (patch) | |
| tree | 531317314903da569eea099c4a07e721de659b93 /src/zenutil/logging.cpp | |
| parent | Change naming to ChunkInfos instead of Chunks (diff) | |
| parent | Update CHANGELOG.md (diff) | |
| download | zen-zs/get-all-chunk-infos.tar.xz zen-zs/get-all-chunk-infos.zip | |
Merge branch 'main' into zs/get-all-chunk-infoszs/get-all-chunk-infos
Diffstat (limited to 'src/zenutil/logging.cpp')
| -rw-r--r-- | src/zenutil/logging.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/zenutil/logging.cpp b/src/zenutil/logging.cpp index d0a6ac0b4..d82789e42 100644 --- a/src/zenutil/logging.cpp +++ b/src/zenutil/logging.cpp @@ -12,6 +12,7 @@ ZEN_THIRD_PARTY_INCLUDES_END #include <zencore/compactbinary.h> #include <zencore/filesystem.h> +#include <zencore/logging.h> #include <zencore/string.h> #include <zenutil/logging/fullformatter.h> #include <zenutil/logging/jsonformatter.h> @@ -152,21 +153,21 @@ BeginInitializeLogging(const LoggingOptions& LogOptions) void FinishInitializeLogging(const LoggingOptions& LogOptions) { - spdlog::level::level_enum LogLevel = spdlog::level::info; + logging::level::LogLevel LogLevel = logging::level::Info; if (LogOptions.IsDebug) { - LogLevel = spdlog::level::debug; + LogLevel = logging::level::Debug; } if (LogOptions.IsTest) { - LogLevel = spdlog::level::trace; + LogLevel = logging::level::Trace; } // Configure all registered loggers according to settings - spdlog::set_level(LogLevel); + logging::RefreshLogLevels(LogLevel); spdlog::flush_on(spdlog::level::err); spdlog::flush_every(std::chrono::seconds{2}); spdlog::set_formatter(std::make_unique<logging::full_formatter>(LogOptions.LogId, std::chrono::system_clock::now())); |