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 Kevin Ottens
parent 039d885b76
commit a57bf0c899

View file

@ -22,6 +22,8 @@
#include <QtGlobal>
#include <qmetaobject.h>
#include <iostream>
#include <zlib.h>
#ifdef Q_OS_WIN
@ -41,6 +43,8 @@ static void mirallLogCatcher(QtMsgType type, const QMessageLogContext &ctx, cons
}
} else 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)