From 029425478aed1454ec3f374af0284371d050ca68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Wed, 19 May 2021 15:23:08 +0200 Subject: [PATCH] Clarify that QLoggingCategory works independent of compiler build type Also mention exception for internal categories starting with 'qt.' Fixes: QTBUG-93852 Change-Id: Iff8657a31074ee70cba25f6acdccb5ba4b1d3b01 Reviewed-by: Mitch Curtis Reviewed-by: Thiago Macieira --- src/corelib/io/qloggingcategory.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index ac633f1885..9d08a2cdac 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -124,7 +124,14 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift) logs messages of type \c QtWarningMsg, \c QtCriticalMsg, \c QtFatalMsg, but ignores messages of type \c QtDebugMsg and \c QtInfoMsg. - If no argument is passed, all messages are logged. + If no argument is passed, all messages are logged. Only Qt internal categories + which start with \c{qt} are handled differently: For these, only messages of type + \c QtInfoMsg, \c QtWarningMsg, and \c QtCriticalMsg are logged by default. + + \note Logging categories are not affected by your C++ build configuration. + That is, whether messages are printed does not change depending on whether + the code is compiled with debug symbols ('Debug Build'), optimizations + ('Release Build'), or some other combination. \section1 Configuring Categories