diff options
| author | Stefan Boberg <[email protected]> | 2023-12-11 10:45:45 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-11 10:45:45 +0100 |
| commit | 25139130fd1130a35a3381ccb143d3adc8c69d07 (patch) | |
| tree | 488e692a4f9e9749061d5bbedeee33b6b4403586 /src/zencore/logging.cpp | |
| parent | fix deadlock at bucket creation (#598) (diff) | |
| download | zen-25139130fd1130a35a3381ccb143d3adc8c69d07.tar.xz zen-25139130fd1130a35a3381ccb143d3adc8c69d07.zip | |
SuppressConsoleLog now removes any existing console logger (#599)
SuppressConsoleLog now removes any existing console logger to avoid exceptions in spdlog
Diffstat (limited to 'src/zencore/logging.cpp')
| -rw-r--r-- | src/zencore/logging.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zencore/logging.cpp b/src/zencore/logging.cpp index 0bf07affd..90f4e2428 100644 --- a/src/zencore/logging.cpp +++ b/src/zencore/logging.cpp @@ -328,6 +328,11 @@ std::shared_ptr<spdlog::logger> ConLogger; void SuppressConsoleLog() { + if (ConLogger) + { + spdlog::drop("console"); + ConLogger = {}; + } ConLogger = spdlog::null_logger_mt("console"); } |