[icinga-checkins] icinga.org: icinga2/master: Flush logger stream after writing 'clear color' ANSI code.

git at icinga.org git at icinga.org
Fri Feb 8 09:40:40 CET 2013


Module: icinga2
Branch: master
Commit: dd9c7b984616cfd74cd39c68486169094b021413
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=dd9c7b984616cfd74cd39c68486169094b021413

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Fri Feb  8 09:40:19 2013 +0100

Flush logger stream after writing 'clear color' ANSI code.

---

 lib/base/streamlogger.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/base/streamlogger.cpp b/lib/base/streamlogger.cpp
index 28042fd..6cc447a 100644
--- a/lib/base/streamlogger.cpp
+++ b/lib/base/streamlogger.cpp
@@ -96,10 +96,12 @@ void StreamLogger::ProcessLogEntry(ostream& stream, bool tty, const LogEntry& en
 
 	stream << "[" << timestamp << "] "
 		 << Logger::SeverityToString(entry.Severity) << "/" << entry.Facility << ": "
-		 << entry.Message << std::endl;
+		 << entry.Message;
 
 	if (tty)
 		stream << "\x1b[0m"; // clear colors
+
+	stream << std::endl;
 }
 
 /**





More information about the icinga-checkins mailing list