Fix: Don't use VT100 color codes in log files

refs #7396
This commit is contained in:
Gunnar Beutner 2014-10-18 00:32:37 +02:00
parent 088efc3c69
commit 29bf22f324
1 changed files with 3 additions and 5 deletions

View File

@ -32,13 +32,11 @@ ConsoleColorTag::ConsoleColorTag(int color)
std::ostream& icinga::operator<<(std::ostream& fp, const ConsoleColorTag& cct)
{
fp.flush();
#ifndef _WIN32
if (l_ConsoleType == Console_VT100)
if (Console::GetType(fp) == Console_VT100)
Console::PrintVT100ColorCode(fp, cct.m_Color);
#else /* _WIN32 */
if (l_ConsoleType == Console_Windows) {
if (Console::GetType(fp) == Console_Windows) {
fp.flush();
Console::SetWindowsConsoleColor(fp, cct.m_Color);
}