Skip to content

Commit

Permalink
Write Qt messages only to log in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored and john-preston committed Aug 11, 2021
1 parent bc2fc94 commit 1d2e34f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Telegram/SourceFiles/core/launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,13 @@ void Launcher::initQtMessageLogging() {
QtMsgType type,
const QMessageLogContext &context,
const QString &msg) {
if (OriginalMessageHandler) {
OriginalMessageHandler(type, context, msg);
}
if (Logs::DebugEnabled() || !Logs::started()) {
if (!Logs::WritingEntry()) {
// Sometimes Qt logs something inside our own logging.
LOG((msg));
}
} else if (OriginalMessageHandler) {
OriginalMessageHandler(type, context, msg);
}
});
}
Expand Down

0 comments on commit 1d2e34f

Please sign in to comment.