diff options
| author | Stefan Boberg <[email protected]> | 2026-03-18 19:46:44 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-18 19:46:44 +0100 |
| commit | 2fd2752d411ea6a0c8c3b5f511cc792217fa3b75 (patch) | |
| tree | 295a90b3488fd861b760a75a59c726672a337ed4 /src/zencore/include | |
| parent | allow xmake sln with open at end (#865) (diff) | |
| download | zen-2fd2752d411ea6a0c8c3b5f511cc792217fa3b75.tar.xz zen-2fd2752d411ea6a0c8c3b5f511cc792217fa3b75.zip | |
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
Diffstat (limited to 'src/zencore/include')
| -rw-r--r-- | src/zencore/include/zencore/logbase.h | 2 | ||||
| -rw-r--r-- | src/zencore/include/zencore/logging.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/zencore/include/zencore/logbase.h b/src/zencore/include/zencore/logbase.h index 046e96db3..ad2ab218d 100644 --- a/src/zencore/include/zencore/logbase.h +++ b/src/zencore/include/zencore/logbase.h @@ -101,7 +101,7 @@ struct LoggerRef inline logging::Logger* operator->() const; inline logging::Logger& operator*() const; - bool ShouldLog(logging::LogLevel Level) const { return m_Logger && m_Logger->ShouldLog(Level); } + bool ShouldLog(logging::LogLevel Level) const { return m_Logger->ShouldLog(Level); } void SetLogLevel(logging::LogLevel NewLogLevel) { m_Logger->SetLevel(NewLogLevel); } logging::LogLevel GetLogLevel() { return m_Logger->GetLevel(); } diff --git a/src/zencore/include/zencore/logging.h b/src/zencore/include/zencore/logging.h index dc5e05656..3427991d2 100644 --- a/src/zencore/include/zencore/logging.h +++ b/src/zencore/include/zencore/logging.h @@ -18,6 +18,7 @@ namespace zen::logging { void InitializeLogging(); void ShutdownLogging(); +bool IsLoggingInitialized(); bool EnableVTMode(); void FlushLogging(); |