Clean context

This commit is contained in:
gabime 2024-12-06 15:21:18 +02:00
parent f6a964d52e
commit 7fe63d6818

View File

@ -12,11 +12,12 @@
namespace spdlog {
#ifndef SPDLOG_DISABLE_GLOBAL_LOGGER
static std::shared_ptr s_context =
#ifndef SPDLOG_DISABLE_GLOBAL_LOGGER
std::make_unique<details::context>(std::make_unique<logger>("", std::make_unique<sinks::stdout_color_sink_mt>()));
#else
static std::shared_ptr s_context = std::make_unique<details::context>();
std::make_unique<details::context>(); // empty context
#endif
void set_context(std::shared_ptr<details::context> context) { s_context = std::move(context); }