Handle changing the colors of STD_ERROR_HANDLE as well

pull/194/head^2
Christopher Torres 10 years ago
parent 97cbb87589
commit 62d177be28
No known key found for this signature in database
GPG Key ID: D26CE56FC38D0C83

@ -103,12 +103,14 @@ inline void wincolor_sink::log(const details::log_msg& msg)
// Wrap the originally formatted message in color codes
#ifdef _WIN32
SetConsoleTextAttribute(GetStdHandle( STD_OUTPUT_HANDLE ), colors_[msg.level]);
SetConsoleTextAttribute(GetStdHandle( STD_ERROR_HANDLE ), colors_[msg.level]);
#endif
sink_->log( msg );
#ifdef _WIN32
SetConsoleTextAttribute( GetStdHandle( STD_OUTPUT_HANDLE ), reset );
SetConsoleTextAttribute(GetStdHandle( STD_ERROR_HANDLE ), reset);
SetConsoleTextAttribute(GetStdHandle( STD_OUTPUT_HANDLE ), reset);
#endif
}

Loading…
Cancel
Save