mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Write Qt messages only to log in debug mode
This commit is contained in:
parent
bc2fc94e25
commit
1d2e34f5e9
1 changed files with 2 additions and 3 deletions
|
@ -427,14 +427,13 @@ void Launcher::initQtMessageLogging() {
|
||||||
QtMsgType type,
|
QtMsgType type,
|
||||||
const QMessageLogContext &context,
|
const QMessageLogContext &context,
|
||||||
const QString &msg) {
|
const QString &msg) {
|
||||||
if (OriginalMessageHandler) {
|
|
||||||
OriginalMessageHandler(type, context, msg);
|
|
||||||
}
|
|
||||||
if (Logs::DebugEnabled() || !Logs::started()) {
|
if (Logs::DebugEnabled() || !Logs::started()) {
|
||||||
if (!Logs::WritingEntry()) {
|
if (!Logs::WritingEntry()) {
|
||||||
// Sometimes Qt logs something inside our own logging.
|
// Sometimes Qt logs something inside our own logging.
|
||||||
LOG((msg));
|
LOG((msg));
|
||||||
}
|
}
|
||||||
|
} else if (OriginalMessageHandler) {
|
||||||
|
OriginalMessageHandler(type, context, msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue