Print critical and fatal messages to stderr

That way we might get a reason why the client crashes (dev setup)
This commit is contained in:
Hannah von Reth 2019-08-13 12:50:35 +02:00 committed by Hannah von Reth
parent 643f9a6fd6
commit ed0f10f2b6

View File

@ -22,6 +22,8 @@
#include <QtGlobal>
#include <qmetaobject.h>
#include <iostream>
#ifdef ZLIB_FOUND
#include <zlib.h>
#endif
@ -37,6 +39,8 @@ static void mirallLogCatcher(QtMsgType type, const QMessageLogContext &ctx, cons
auto logger = Logger::instance();
if (!logger->isNoop()) {
logger->doLog(qFormatLogMessage(type, ctx, message));
} else if(type >= QtCriticalMsg) {
std::cerr << qPrintable(qFormatLogMessage(type, ctx, message)) << std::endl;
}
#if defined(Q_OS_WIN)