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>
This commit is contained in:
Tor Arne Vestbø 2018-02-07 12:17:15 +01:00
parent 96bf3b7a74
commit 7ec9813490

View File

@ -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);