diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-02-07 12:17:15 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-02-08 16:59:16 +0000 |
commit | 7ec98134902de9afce51c66e8c252e004f5891b1 (patch) | |
tree | f986c28be7b125fee9a521d67258c090f72d79f2 /src/corelib/global/qlogging.cpp | |
parent | 96bf3b7a74432675da68cd9f501a58db16af0402 (diff) |
Fix inverted logic in slog2 log handler for when to disable logging
If we are logging to the console, we should _not_ log to slog2, like
the other log backends.
Change-Id: I6d16704c0f0923f54b3dc030d374af9805c2af06
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qlogging.cpp')
-rw-r--r-- | src/corelib/global/qlogging.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index c727d5738b..e2d08544a1 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1324,7 +1324,7 @@ static QString formatBacktraceForLogMessage(const QMessagePattern::BacktracePara static bool slog2_default_handler(QtMsgType type, const QMessageLogContext &context, const QString &message) { - if (!qt_logging_to_console()) + if (qt_logging_to_console()) return false; QString formattedMessage = qFormatLogMessage(type, context, message); |