Commit a302782b authored by Alexis Girault's avatar Alexis Girault
Browse files

STYLE: Correct stdSink log on Windows

Did not support colors in standard output,
use std::cout and std::cerr instead.
parent 596794c0
......@@ -35,11 +35,24 @@ void
stdSink::ReceiveLogMessage(g3::LogMessageMover logEntry)
{
auto level = logEntry.get()._level;
auto color = GetColor(level);
auto message = logEntry.get().message();
#ifndef WIN32
auto color = GetColor(level);
std::cout << "\033[" << color << "m"
<< logEntry.get().message()
<< "\033[m" << std::endl;
<< message
<< "\033[m" << std::endl;
#else
if (level.value == WARNING.value || level.value == FATAL.value)
{
std::cerr << message << std::endl;
}
else
{
std::cout << message << std::endl;
}
#endif
}
void
......
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