From 2fd2752d411ea6a0c8c3b5f511cc792217fa3b75 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Wed, 18 Mar 2026 19:46:44 +0100 Subject: Pre-initialization of default logger (#859) Improved workaround for troubles with code potentially logging before logging is initialized. Any logging will be routed to a default console logger until logging is initialized fully --- src/zencore/sentryintegration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/zencore/sentryintegration.cpp') diff --git a/src/zencore/sentryintegration.cpp b/src/zencore/sentryintegration.cpp index 634045cfb..c9c843dd6 100644 --- a/src/zencore/sentryintegration.cpp +++ b/src/zencore/sentryintegration.cpp @@ -160,7 +160,7 @@ SentryLogFunction(sentry_level_t Level, const char* Message, va_list Args, [[may // been configured, we ignore the callbacks for DEBUG/INFO explicitly here // which means users don't see every possible log message if they're trying // to configure the levels using --log-debug=sentry-sdk - if (!TheDefaultLogger || !s_SentryLogEnabled.load(std::memory_order_acquire)) + if (!zen::logging::IsLoggingInitialized() || !s_SentryLogEnabled.load(std::memory_order_acquire)) { switch (Level) { -- cgit v1.2.3