From 3fac9ba212804b497efb04031b3ac3bb2c8f7a2c Mon Sep 17 00:00:00 2001 From: Christopher Torres Date: Thu, 14 Apr 2016 12:20:36 -0400 Subject: [PATCH] create_console_logger now uses the correct color sink depending on your platform --- include/spdlog/details/spdlog_impl.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/spdlog/details/spdlog_impl.h b/include/spdlog/details/spdlog_impl.h index 10d0e685..423ec43d 100644 --- a/include/spdlog/details/spdlog_impl.h +++ b/include/spdlog/details/spdlog_impl.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -61,7 +62,11 @@ inline std::shared_ptr spdlog::daily_logger_st(const std::string inline std::shared_ptr create_console_logger(const std::string& logger_name, spdlog::sink_ptr sink, bool color) { if (color) //use color wrapper sink +#ifdef _WIN32 + sink = std::make_shared(sink); +#else sink = std::make_shared(sink); +#endif return spdlog::details::registry::instance().create(logger_name, sink); }