[Logger] Ensure errors are also printed to an attached console
authorHannah von Reth <hannah.vonreth@owncloud.com>
Tue, 17 Mar 2020 08:08:27 +0000 (09:08 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Wed, 1 Jul 2020 13:13:20 +0000 (15:13 +0200)
src/libsync/logger.cpp

index a1ba8b0158c2ed4bbccaa8526d830d4324ff9556..fade2084bd559f2c815ee20a15fe0fd5e400d24a 100644 (file)
@@ -42,7 +42,8 @@ static void mirallLogCatcher(QtMsgType type, const QMessageLogContext &ctx, cons
         }
     } else if (!logger->isNoop()) {
         logger->doLog(qFormatLogMessage(type, ctx, message));
-    } else if(type == QtCriticalMsg || type == QtFatalMsg) {
+    }
+    if(type == QtCriticalMsg || type == QtFatalMsg) {
         std::cerr << qPrintable(qFormatLogMessage(type, ctx, message)) << std::endl;
     }