From b393c9d6e62f6f7e09c34f928272ccc36988077d Mon Sep 17 00:00:00 2001 From: gabime Date: Sun, 29 Apr 2018 00:23:59 +0300 Subject: [PATCH] Fixed console traits --- include/spdlog/details/traits.h | 2 +- include/spdlog/sinks/ansicolor_sink.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/spdlog/details/traits.h b/include/spdlog/details/traits.h index 6ce2cb27..d494cf73 100644 --- a/include/spdlog/details/traits.h +++ b/include/spdlog/details/traits.h @@ -25,7 +25,7 @@ struct console_stderr_trait { static FILE *stream() { - return stdout; + return stderr; } #ifdef _WIN32 static HANDLE handle() diff --git a/include/spdlog/sinks/ansicolor_sink.h b/include/spdlog/sinks/ansicolor_sink.h index 22192889..06e1867a 100644 --- a/include/spdlog/sinks/ansicolor_sink.h +++ b/include/spdlog/sinks/ansicolor_sink.h @@ -22,13 +22,13 @@ namespace sinks { * of the message. * If no color terminal detected, omit the escape codes. */ -template +template class ansicolor_sink : public sink { public: using mutex_t = typename ConsoleMutexTrait::mutex_t; ansicolor_sink() - : target_file_(ConsoleTargetTrait::stream()) + : target_file_(StreamTrait::stream()) , _mutex(ConsoleMutexTrait::console_mutex()) {