Fixed console traits

This commit is contained in:
gabime 2018-04-29 00:23:59 +03:00
parent e4f0d6446b
commit b393c9d6e6
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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())
{ {