QT_LOGGING_RULES supports multiple rules separated by semicolons
[ChangeLog][QtCore][Logging] QT_LOGGING_RULES now supports multiple rules separated by semicolons Change-Id: I7fdd62a3d719aeb16cad54f193befb6c203bc160 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
This commit is contained in:
parent
287971eb7f
commit
8f814e8cba
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user