mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 21:55:03 +02:00
Americaniz(s)e colo(u)r in troubleshoot cli
This commit is contained in:
parent
c61134d55a
commit
4d0ee2a7fd
@ -81,7 +81,7 @@ public:
|
|||||||
delete m_Stream;
|
delete m_Stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WriteLine(const LogSeverity sev, const int colour, const String& str)
|
void WriteLine(const LogSeverity sev, const int color, const String& str)
|
||||||
{
|
{
|
||||||
if (!m_Console)
|
if (!m_Console)
|
||||||
Log(sev, "troubleshoot", str);
|
Log(sev, "troubleshoot", str);
|
||||||
@ -100,7 +100,7 @@ public:
|
|||||||
<< ConsoleColorTag(Console_Normal, m_ConsoleType);
|
<< ConsoleColorTag(Console_Normal, m_ConsoleType);
|
||||||
} else
|
} else
|
||||||
*m_Stream
|
*m_Stream
|
||||||
<< ConsoleColorTag(colour, m_ConsoleType) << str
|
<< ConsoleColorTag(color, m_ConsoleType) << str
|
||||||
<< ConsoleColorTag(Console_Normal, m_ConsoleType);
|
<< ConsoleColorTag(Console_Normal, m_ConsoleType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ class TroubleshootCommand::InfoLogLine
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InfoLogLine(InfoLog& log, int col = Console_Normal, LogSeverity sev = LogInformation)
|
InfoLogLine(InfoLog& log, int col = Console_Normal, LogSeverity sev = LogInformation)
|
||||||
: m_Log(log), m_Sev(sev), m_Color(col) {}
|
: m_Log(log), m_Color(col), m_Sev(sev) {}
|
||||||
|
|
||||||
~InfoLogLine(void)
|
~InfoLogLine(void)
|
||||||
{
|
{
|
||||||
@ -136,8 +136,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
std::ostringstream m_String;
|
std::ostringstream m_String;
|
||||||
InfoLog& m_Log;
|
InfoLog& m_Log;
|
||||||
LogSeverity m_Sev;
|
|
||||||
int m_Color;
|
int m_Color;
|
||||||
|
LogSeverity m_Sev;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user