mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-31 01:29:21 +08:00
Clean context
This commit is contained in:
parent
f6a964d52e
commit
7fe63d6818
@ -12,11 +12,12 @@
|
|||||||
|
|
||||||
namespace spdlog {
|
namespace spdlog {
|
||||||
|
|
||||||
#ifndef SPDLOG_DISABLE_GLOBAL_LOGGER
|
|
||||||
static std::shared_ptr s_context =
|
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>()));
|
std::make_unique<details::context>(std::make_unique<logger>("", std::make_unique<sinks::stdout_color_sink_mt>()));
|
||||||
#else
|
#else
|
||||||
static std::shared_ptr s_context = std::make_unique<details::context>();
|
std::make_unique<details::context>(); // empty context
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void set_context(std::shared_ptr<details::context> context) { s_context = std::move(context); }
|
void set_context(std::shared_ptr<details::context> context) { s_context = std::move(context); }
|
||||||
|
Loading…
Reference in New Issue
Block a user