From 52e812565ce8fa0e7152a3dfcf5442b1b2e26e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20=C3=87etin?= <64282645+egecetin@users.noreply.github.com> Date: Sat, 28 Dec 2024 13:44:26 +0300 Subject: [PATCH] Drop mainlogger instance to release background resources (#363) --- src/logging/Logger.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/logging/Logger.cpp b/src/logging/Logger.cpp index 576d3088b..04a23ce46 100644 --- a/src/logging/Logger.cpp +++ b/src/logging/Logger.cpp @@ -49,4 +49,9 @@ MainLogger::~MainLogger() { spdlog::info("Goodbye!"); _mainLogger->flush(); + spdlog::drop(_mainLogger->name()); + + // Set default logger + spdlog::set_default_logger( + std::make_shared("default", std::make_shared())); }