Mercurial > hg > orthanc
changeset 1507:46b2794042d6 Orthanc-0.9.3
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Aug 2015 20:14:26 +0200 |
parents | 18518e1f5fb0 |
children | 86394eb9f5bb 293659218a6a |
files | Core/Logging.cpp Core/Logging.h |
diffstat | 2 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/Logging.cpp Fri Aug 07 18:27:20 2015 +0200 +++ b/Core/Logging.cpp Fri Aug 07 20:14:26 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 18:27:20 2015 +0200 +++ b/Core/Logging.h Fri Aug 07 20:14:26 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) {