diff options
Diffstat (limited to 'src/zenutil/logging/logging.cpp')
| -rw-r--r-- | src/zenutil/logging/logging.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/zenutil/logging/logging.cpp b/src/zenutil/logging/logging.cpp index aa34fc50c..936e3c4fd 100644 --- a/src/zenutil/logging/logging.cpp +++ b/src/zenutil/logging/logging.cpp @@ -124,7 +124,7 @@ BeginInitializeLogging(const LoggingOptions& LogOptions) LoggerRef DefaultLogger = zen::logging::Default(); - // Build the broadcast sink — a shared indirection point that all + // Build the broadcast sink - a shared indirection point that all // loggers cloned from the default will share. Adding or removing // a child sink later is immediately visible to every logger. std::vector<logging::SinkPtr> BroadcastChildren; @@ -158,6 +158,10 @@ BeginInitializeLogging(const LoggingOptions& LogOptions) } #endif + // Trace forwarding is installed at a lower level (in Logger::Log itself) + // so it can see the typed fmt argument pack before vformat collapses it + // to a string - see src/zencore/logging/tracelog.cpp. + g_BroadcastSink = Ref<logging::BroadcastSink>(new logging::BroadcastSink(std::move(BroadcastChildren))); bool IsAsync = LogOptions.AllowAsync && !LogOptions.IsDebug && !LogOptions.IsTest; @@ -179,7 +183,7 @@ BeginInitializeLogging(const LoggingOptions& LogOptions) { return; } - static constinit logging::LogPoint ErrorPoint{{}, logging::Err, "{}"}; + static constinit logging::LogPoint ErrorPoint{0, 0, logging::Err, "{}"}; if (auto ErrLogger = zen::logging::ErrorLog()) { try @@ -249,7 +253,7 @@ FinishInitializeLogging(const LoggingOptions& LogOptions) const std::string StartLogTime = zen::DateTime::Now().ToIso8601(); logging::Registry::Instance().ApplyAll([&](auto Logger) { - static constinit logging::LogPoint LogStartPoint{{}, logging::Info, "log starting at {}"}; + static constinit logging::LogPoint LogStartPoint{0, 0, logging::Info, "log starting at {}"}; Logger->Log(LogStartPoint, fmt::make_format_args(StartLogTime)); }); } |