From 516f558742dfa8da7a5e6def39309516d703bc1b Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Mon, 4 Mar 2019 11:27:15 +0100 Subject: [kconf_update] move from custom logging tech to qCDebug Summary: the previous logging tech got kind of defunct in 2014 (to the point where it was basically qCDebug). seeing as no one really complained it seems reasonable to just move to qCDebug instead and make use of category filters and other qdebug goodness (such as system logging facilities for the various platforms) - new logging category kf5.kconfig.update; at info level by default (i.e. unless otherwise configured kconf_update is now silent) - --debug cmdline option now also attempts to force-enable the debug mode on that category (and debugs that attempt in of itself, so we don't get confused by categories magically getting enabled). - all log() calls are now qCDebug calls - all logFileErorr() calls (which was context-sensitive to the .upd file parsing) have been changed to qCDebugFile - qCDebugFile is a new *macro* wrapping around qCDebug to give it file context - everything is now qCDebug instead of qDebug - arguments updated to drop excess quoting and spaces to reduce "noise" https://markmail.org/thread/ofaeqcabguxyohyb Test Plan: updater still works and debugs when debug is enabled Reviewers: apol, aacid, #frameworks Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D19508 --- src/kconf_update/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/kconf_update/CMakeLists.txt') diff --git a/src/kconf_update/CMakeLists.txt b/src/kconf_update/CMakeLists.txt index 63a19b41..6947f949 100644 --- a/src/kconf_update/CMakeLists.txt +++ b/src/kconf_update/CMakeLists.txt @@ -7,6 +7,11 @@ set(kconf_update_SRCS kconfigutils.cpp ) +ecm_qt_declare_logging_category(kconf_update_SRCS + HEADER kconf_update_debug.h + IDENTIFIER KCONF_UPDATE_LOG + CATEGORY_NAME kf5.kconfig.update) + add_executable(kconf_update ${kconf_update_SRCS}) add_executable(KF5::kconf_update ALIAS kconf_update) target_link_libraries(kconf_update Qt5::Core KF5::ConfigCore) -- cgit v1.2.1