]> granicus.if.org Git - icinga2/commitdiff
Make warning and critical log messages bold on terminals
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 20 Oct 2014 11:15:37 +0000 (13:15 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 20 Oct 2014 11:15:37 +0000 (13:15 +0200)
lib/base/streamlogger.cpp

index ee2cf90ffcaf1b645d6c17c8b0fc176e26eb3a2a..d5fd39ad0b28f8bde8aa991d2e895b54eae1afdd 100644 (file)
@@ -100,7 +100,7 @@ void StreamLogger::ProcessLogEntry(std::ostream& stream, const LogEntry& entry)
 
        stream << "[" << timestamp << "] ";
 
-       ConsoleColor color;
+       int color;
 
        switch (entry.Severity) {
                case LogDebug:
@@ -113,10 +113,10 @@ void StreamLogger::ProcessLogEntry(std::ostream& stream, const LogEntry& entry)
                        color = Console_ForegroundGreen;
                        break;
                case LogWarning:
-                       color = Console_ForegroundYellow;
+                       color = Console_ForegroundYellow | Console_Bold;
                        break;
                case LogCritical:
-                       color = Console_ForegroundRed;
+                       color = Console_ForegroundRed | Console_Bold;
                        break;
                default:
                        return;