Improve debugging output for QLoggingCategory
Make sure that the source the rules are loaded from is printed before any syntax errors. Change-Id: Id7ced1a346dd0d8501eab93ac00e1f432ca6b703 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
parent
1f9de90b4e
commit
c76a91ebdc
@ -261,12 +261,12 @@ void QLoggingRegistry::init()
|
|||||||
if (!rulesFilePath.isEmpty()) {
|
if (!rulesFilePath.isEmpty()) {
|
||||||
QFile file(QFile::decodeName(rulesFilePath));
|
QFile file(QFile::decodeName(rulesFilePath));
|
||||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
QTextStream stream(&file);
|
|
||||||
QLoggingSettingsParser parser;
|
|
||||||
parser.setContent(stream);
|
|
||||||
if (qtLoggingDebug())
|
if (qtLoggingDebug())
|
||||||
debugMsg("Loading \"%s\" ...",
|
debugMsg("Loading \"%s\" ...",
|
||||||
QDir::toNativeSeparators(file.fileName()).toUtf8().constData());
|
QDir::toNativeSeparators(file.fileName()).toUtf8().constData());
|
||||||
|
QTextStream stream(&file);
|
||||||
|
QLoggingSettingsParser parser;
|
||||||
|
parser.setContent(stream);
|
||||||
envRules = parser.rules();
|
envRules = parser.rules();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -285,12 +285,12 @@ void QLoggingRegistry::init()
|
|||||||
if (!envPath.isEmpty()) {
|
if (!envPath.isEmpty()) {
|
||||||
QFile file(envPath);
|
QFile file(envPath);
|
||||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||||
QTextStream stream(&file);
|
|
||||||
QLoggingSettingsParser parser;
|
|
||||||
parser.setContent(stream);
|
|
||||||
if (qtLoggingDebug())
|
if (qtLoggingDebug())
|
||||||
debugMsg("Loading \"%s\" ...",
|
debugMsg("Loading \"%s\" ...",
|
||||||
QDir::toNativeSeparators(envPath).toUtf8().constData());
|
QDir::toNativeSeparators(envPath).toUtf8().constData());
|
||||||
|
QTextStream stream(&file);
|
||||||
|
QLoggingSettingsParser parser;
|
||||||
|
parser.setContent(stream);
|
||||||
configRules = parser.rules();
|
configRules = parser.rules();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user