As can be seen from the output of https://lxr.kde.org/search?_filestring=frameworks&_string=Q_LOGGING_CATEGORY the default log level for different debug categories varies from QtCriticalMsg to QtInfoMsg. As soon as kdebugsettings is started and either Apply or Ok is clicked, the log level for all categories is set to QtInfoMsg. 1. For each of the ~300 categories 4 rules are created, >= 1200 rules in total 2. The only possibility to reset the log levels is by deleting ~/.config/QtProject/qtlogging.ini 3. Setting the log level to QtInfoMsg increases the log level for every category which defaults to Critical or Warning 4. it lowers the log level for categories defaulting to Debug
"As can be seen from the output of https://lxr.kde.org/search?_filestring=frameworks&_string=Q_LOGGING_CATEGORY the default log level for different debug categories varies from QtCriticalMsg to QtInfoMsg." all module which doesn't use debug categories files will not override by kdebugsettings => so kdebugsettings will not change settings for these modules. But indeed it will change settings for other modules. But default all module uses same settings generated by categories ecm macro. => QtInfoMsg see #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) Q_LOGGING_CATEGORY(RUQOLA_DDPAPI_COMMAND_LOG, "org.kde.ruqola.ddpapi.command", QtInfoMsg) #else Q_LOGGING_CATEGORY(RUQOLA_DDPAPI_COMMAND_LOG, "org.kde.ruqola.ddpapi.command") #endif " => it's normal. " 3. Setting the log level to QtInfoMsg increases the log level for every category which defaults to Critical or Warning" it's wrong as we can't change settings from module which doesn't use debug categories file. "4. it lowers the log level for categories defaulting to Debug" wrong too.
(In reply to Laurent Montel from comment #1) > "As can be seen from the output of > https://lxr.kde.org/search?_filestring=frameworks&_string=Q_LOGGING_CATEGORY > > the default log level for different debug categories varies from > QtCriticalMsg to QtInfoMsg." > > all module which doesn't use debug categories files will not override by > kdebugsettings => so kdebugsettings will not change settings for these > modules. > > But indeed it will change settings for other modules. > > But default all module uses same settings generated by categories ecm macro. > > => QtInfoMsg > > see #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) > Q_LOGGING_CATEGORY(RUQOLA_DDPAPI_COMMAND_LOG, > "org.kde.ruqola.ddpapi.command", QtInfoMsg) > #else > Q_LOGGING_CATEGORY(RUQOLA_DDPAPI_COMMAND_LOG, > "org.kde.ruqola.ddpapi.command") > #endif > > " > => it's normal. grep kf5.kio.kio_http /etc/xdg/*categories /etc/xdg/kde.categories:kf5.kio.kio_http KIO HTTP slave (KIO) https://lxr.kde.org/source/frameworks/kio/src/ioslaves/http/http.cpp#0080 0080 Q_LOGGING_CATEGORY(KIO_HTTP, "kf5.kio.kio_http", QtWarningMsg) // disable debug by default > " > 3. Setting the log level to QtInfoMsg increases the log level for every > category which defaults to Critical or Warning" > > it's wrong as we can't change settings from module which doesn't use debug > categories file. See above - even modules with categories file have deviating settings.
(In reply to Stefan Brüns from comment #2) > (In reply to Laurent Montel from comment #1) > > "As can be seen from the output of > > https://lxr.kde.org/search?_filestring=frameworks&_string=Q_LOGGING_CATEGORY > > > > the default log level for different debug categories varies from > > QtCriticalMsg to QtInfoMsg." > > > > all module which doesn't use debug categories files will not override by > > kdebugsettings => so kdebugsettings will not change settings for these > > modules. > > > > But indeed it will change settings for other modules. > > > > But default all module uses same settings generated by categories ecm macro. > > > > => QtInfoMsg > > > > see #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) > > Q_LOGGING_CATEGORY(RUQOLA_DDPAPI_COMMAND_LOG, > > "org.kde.ruqola.ddpapi.command", QtInfoMsg) > > #else > > Q_LOGGING_CATEGORY(RUQOLA_DDPAPI_COMMAND_LOG, > > "org.kde.ruqola.ddpapi.command") > > #endif > > > > " > > => it's normal. > > grep kf5.kio.kio_http /etc/xdg/*categories > /etc/xdg/kde.categories:kf5.kio.kio_http KIO HTTP slave (KIO) > > https://lxr.kde.org/source/frameworks/kio/src/ioslaves/http/http.cpp#0080 > 0080 Q_LOGGING_CATEGORY(KIO_HTTP, "kf5.kio.kio_http", QtWarningMsg) // > disable debug by default So it's a bug in this package. We must create a categories file if we don't use generated categories file otherwise it's impossible to which type of warning is setting. > > > " > > 3. Setting the log level to QtInfoMsg increases the log level for every > > category which defaults to Critical or Warning" > > > > it's wrong as we can't change settings from module which doesn't use debug > > categories file. > > See above - even modules with categories file have deviating settings.
I looked how to implement it. I will do soon. But I need to fix categories files.
Fixed in 18.04.0
Git commit 7aff08c1fc1f4605ed37659b4b13e91177e16fd3 by Laurent Montel. Committed on 21/02/2018 at 12:24. Pushed by mlaurent into branch 'master'. Fix Bug 390752 - Kdebugsettings overwrites default debug level for all log categories FIXED-IN: 18.04.0 M +14 -0 autotests/categorytypecomboboxtest.cpp M +2 -0 autotests/categorytypecomboboxtest.h M +35 -3 autotests/kdebugsettingutiltest.cpp M +4 -0 autotests/kdebugsettingutiltest.h M +1 -1 data/kde.categories M +10 -0 src/categorytypecombobox.cpp M +2 -0 src/categorytypecombobox.h M +7 -2 src/kdeapplicationtreelistwidget.cpp M +1 -0 src/kdeapplicationtreelistwidget.h M +1 -0 src/kdebugsettingsdialog.cpp M +19 -1 src/kdebugsettingsutil.cpp M +1 -0 src/kdebugsettingsutil.h M +5 -2 src/loadcategoriesjob.cpp M +3 -3 src/loggingcategory.cpp M +3 -2 src/loggingcategory.h https://commits.kde.org/kdebugsettings/7aff08c1fc1f4605ed37659b4b13e91177e16fd3
Thanks a lot! I saw you also made some adjustments to qDebug usage in kdepim and oauth, very welcome as well!