changeset 1508:86394eb9f5bb

merge
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 07 Aug 2015 20:14:49 +0200
parents 9a86860572e6 (current diff) 46b2794042d6 (diff)
children 0586ed8897f1
files
diffstat 2 files changed, 18 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/Core/Logging.cpp	Fri Aug 07 19:12:53 2015 +0200
+++ b/Core/Logging.cpp	Fri Aug 07 20:14:49 2015 +0200
@@ -373,6 +373,23 @@
 
       (*stream_) << header;
     }
+
+
+    InternalLogger::~InternalLogger()
+    {
+      if (stream_ != &null_)
+      {
+#if defined(_WIN32)
+        *stream_ << "\r\n";
+#else
+        *stream_ << "\n";
+#endif
+
+        stream_->flush();
+      }
+    }
+      
+
   }
 }
 
--- a/Core/Logging.h	Fri Aug 07 19:12:53 2015 +0200
+++ b/Core/Logging.h	Fri Aug 07 20:14:49 2015 +0200
@@ -81,14 +81,7 @@
                      const char* file,
                      int line);
 
-      ~InternalLogger()
-      {
-#if defined(_WIN32)
-        *stream_ << "\r\n";
-#else
-        *stream_ << "\n";
-#endif
-      }
+      ~InternalLogger();
       
       std::ostream& operator<< (const std::string& message)
       {