mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
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:
parent
643f9a6fd6
commit
ed0f10f2b6
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user