diff --git a/src/details/context.cpp b/src/details/context.cpp index de707c42..a4137cd8 100644 --- a/src/details/context.cpp +++ b/src/details/context.cpp @@ -5,12 +5,7 @@ #include "spdlog/logger.h" #ifndef SPDLOG_DISABLE_GLOBAL_LOGGER - // support for the global stdout color logger - #ifdef _WIN32 - #include "spdlog/sinks/wincolor_sink.h" - #else - #include "spdlog/sinks/ansicolor_sink.h" - #endif +#include "spdlog/sinks/stdout_color_sinks.h" #endif // SPDLOG_DISABLE_GLOBAL_LOGGER #include @@ -20,15 +15,8 @@ namespace details { context::context() { #ifndef SPDLOG_DISABLE_GLOBAL_LOGGER - // create global logger (ansicolor_stdout_sink_mt or wincolor_stdout_sink_mt in windows). - #ifdef _WIN32 - auto color_sink = std::make_shared(); - #else - auto color_sink = std::make_shared(); - #endif - const char *global_logger_name = ""; - global_logger_ = std::make_shared(global_logger_name, std::move(color_sink)); - + auto color_sink = std::make_shared(); + global_logger_ = std::make_shared(std::string(), std::move(color_sink)); #endif // SPDLOG_DISABLE_GLOBAL_LOGGER }