summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Base/Log.cpp')
-rw-r--r--Swiften/Base/Log.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Swiften/Base/Log.cpp b/Swiften/Base/Log.cpp
index abfd2bc..b6f1851 100644
--- a/Swiften/Base/Log.cpp
+++ b/Swiften/Base/Log.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2019 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -30,7 +30,9 @@ Log::~Log() {
if (logCallback) {
logCallback(severity_, std::move(file_), line_, std::move(function_), stream.str());
}
- else if (logfile) {
+ else {
+ stream << std::endl;
+ if (logfile) {
fwrite(stream.str().c_str(), sizeof(char), stream.str().size(), logfile.get());
fflush(logfile.get());
}
@@ -38,6 +40,7 @@ Log::~Log() {
fwrite(stream.str().c_str(), sizeof(char), stream.str().size(), stderr);
fflush(stderr);
}
+ }
#endif
}