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); }