CTF: Fix QTRACE_LOCATION warnings during compilation

When compiling with CTF tracing, QTRACE_LOCATION not set warnigs are
printed constantly. Fix this by changing the log to info and default
log message level to warning.

Change-Id: Ib167ec1b41ff0134fa9b3eba09394bb0bef54379
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
(cherry picked from commit ebdf20240cbe78746d21c6af7c267982bfea3cb0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Antti Määttä 2023-03-24 15:01:27 +02:00 committed by Qt Cherry-pick Bot
parent d0b4ee0707
commit ba030f8427

View File

@ -19,7 +19,7 @@ QT_BEGIN_NAMESPACE
using namespace Qt::StringLiterals;
Q_LOGGING_CATEGORY(lcDebugTrace, "qt.core.ctf");
Q_LOGGING_CATEGORY(lcDebugTrace, "qt.core.ctf", QtWarningMsg)
static const size_t packetHeaderSize = 24 + 6 * 8 + 4;
static const size_t packetSize = 4096;
@ -56,7 +56,7 @@ QCtfLibImpl::QCtfLibImpl()
{
QString location = QString::fromUtf8(qgetenv("QTRACE_LOCATION"));
if (location.isEmpty()) {
qCWarning (lcDebugTrace) << "QTRACE_LOCATION not set";
qCInfo (lcDebugTrace) << "QTRACE_LOCATION not set";
return;
}