diff options
-rw-r--r-- | src/corelib/io/qloggingcategory.cpp | 8 | ||||
-rw-r--r-- | src/corelib/io/qloggingregistry.cpp | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index e6bc7caaeb..1d06e2a912 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -147,6 +147,14 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift) \c QT_LOGGING_CONF, and rules set by \c QT_LOGGING_RULES. + Since Qt 5.6, \c QT_LOGGING_RULES may contain multiple rules separated + by semicolons: + + \code + QT_LOGGING_RULES="*.debug=false;driver.usb.debug=true" + \endcode + + Order of evaluation: \list \li QtProject/qtlogging.ini diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp index 7f2ce319ee..85e73db652 100644 --- a/src/corelib/io/qloggingregistry.cpp +++ b/src/corelib/io/qloggingregistry.cpp @@ -265,7 +265,7 @@ void QLoggingRegistry::init() envRules = parser.rules(); } } - const QByteArray rulesSrc = qgetenv("QT_LOGGING_RULES"); + const QByteArray rulesSrc = qgetenv("QT_LOGGING_RULES").replace(';', '\n'); if (!rulesSrc.isEmpty()) { QTextStream stream(rulesSrc); QLoggingSettingsParser parser; |