Commit b393c9d6 authored by gabime's avatar gabime

Fixed console traits

parent e4f0d644
...@@ -25,7 +25,7 @@ struct console_stderr_trait ...@@ -25,7 +25,7 @@ struct console_stderr_trait
{ {
static FILE *stream() static FILE *stream()
{ {
return stdout; return stderr;
} }
#ifdef _WIN32 #ifdef _WIN32
static HANDLE handle() static HANDLE handle()
......
...@@ -22,13 +22,13 @@ namespace sinks { ...@@ -22,13 +22,13 @@ namespace sinks {
* of the message. * of the message.
* If no color terminal detected, omit the escape codes. * If no color terminal detected, omit the escape codes.
*/ */
template<class ConsoleTargetTrait, class ConsoleMutexTrait> template<class StreamTrait, class ConsoleMutexTrait>
class ansicolor_sink : public sink class ansicolor_sink : public sink
{ {
public: public:
using mutex_t = typename ConsoleMutexTrait::mutex_t; using mutex_t = typename ConsoleMutexTrait::mutex_t;
ansicolor_sink() ansicolor_sink()
: target_file_(ConsoleTargetTrait::stream()) : target_file_(StreamTrait::stream())
, _mutex(ConsoleMutexTrait::console_mutex()) , _mutex(ConsoleMutexTrait::console_mutex())
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment