From 25139130fd1130a35a3381ccb143d3adc8c69d07 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 11 Dec 2023 10:45:45 +0100 Subject: SuppressConsoleLog now removes any existing console logger (#599) SuppressConsoleLog now removes any existing console logger to avoid exceptions in spdlog --- src/zencore/logging.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/zencore/logging.cpp') 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 ConLogger; void SuppressConsoleLog() { + if (ConLogger) + { + spdlog::drop("console"); + ConLogger = {}; + } ConLogger = spdlog::null_logger_mt("console"); } -- cgit v1.2.3