Skip to content

Commit

Permalink
Drop mainlogger instance to release background resources (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
egecetin authored Dec 28, 2024
1 parent dc26aa7 commit 52e8125
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/logging/Logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<spdlog::logger>("default", std::make_shared<spdlog::sinks::stdout_color_sink_mt>()));
}

0 comments on commit 52e8125

Please sign in to comment.