Address review comments
This commit is contained in:
parent
f6762f05cd
commit
7b78425d6b
3 changed files with 22 additions and 20 deletions
|
@ -31,13 +31,16 @@ std::string FormatLogMessage(const Entry& entry) {
|
|||
}
|
||||
|
||||
void PrintMessage(const Entry& entry) {
|
||||
auto str = FormatLogMessage(entry) + "\n";
|
||||
auto str = FormatLogMessage(entry) + '\n';
|
||||
fputs(str.c_str(), stderr);
|
||||
}
|
||||
|
||||
void PrintColoredMessage(const Entry& entry) {
|
||||
#ifdef _WIN32
|
||||
HANDLE console_handle = GetStdHandle(STD_ERROR_HANDLE);
|
||||
if (console_handle == INVALID_HANDLE_VALUE) {
|
||||
return;
|
||||
}
|
||||
|
||||
CONSOLE_SCREEN_BUFFER_INFO original_info = {0};
|
||||
GetConsoleScreenBufferInfo(console_handle, &original_info);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue