qt: Add separate logging category for result of config loading

* lang/qt/src/qgpgme_debug.h: Make include guard match file name.
* lang/qt/src/qgpgme_debug.h, lang/qt/src/qgpgme_debug.cpp
(QGPGME_CONFIG_LOADING_LOG): New.
* lang/qt/src/qgpgmenewcryptoconfig.cpp
(QGpgMENewCryptoConfig::reloadConfiguration): Use new logging category.
--

Use a separate logging category for the extremely noisy logging of
the result of config loading to make debug logging more useful.

GnuPG-bug-id: 5217
This commit is contained in:
Ingo Klöcker 2021-06-02 10:56:52 +02:00
parent 5512133de4
commit 5bc4e23a57
3 changed files with 6 additions and 7 deletions

View File

@ -1,5 +1,3 @@
// This file is autogenerated by CMake: DO NOT EDIT
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
@ -9,6 +7,8 @@
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
Q_LOGGING_CATEGORY(QGPGME_LOG, "gpg.qgpgme", QtWarningMsg) Q_LOGGING_CATEGORY(QGPGME_LOG, "gpg.qgpgme", QtWarningMsg)
Q_LOGGING_CATEGORY(QGPGME_CONFIG_LOADING_LOG, "gpg.qgpgme.config_loading", QtInfoMsg)
#else #else
Q_LOGGING_CATEGORY(QGPGME_LOG, "gpg.qgpgme") Q_LOGGING_CATEGORY(QGPGME_LOG, "gpg.qgpgme")
Q_LOGGING_CATEGORY(QGPGME_CONFIG_LOADING_LOG, "gpg.qgpgme.config_loading")
#endif #endif

View File

@ -1,11 +1,10 @@
// This file is autogenerated by CMake: DO NOT EDIT #ifndef QGPGME_QGPGME_DEBUG_H
#define QGPGME_QGPGME_DEBUG_H
#ifndef QGPGME_LOG_H
#define QGPGME_LOG_H
#include <QLoggingCategory> #include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(QGPGME_LOG) Q_DECLARE_LOGGING_CATEGORY(QGPGME_LOG)
Q_DECLARE_LOGGING_CATEGORY(QGPGME_CONFIG_LOADING_LOG)
#endif #endif

View File

@ -101,7 +101,7 @@ void QGpgMENewCryptoConfig::reloadConfiguration(bool)
<< "components:\n"; << "components:\n";
std::copy(components.begin(), components.end(), std::copy(components.begin(), components.end(),
std::ostream_iterator<Component>(ss, "\n")); std::ostream_iterator<Component>(ss, "\n"));
qCDebug(QGPGME_LOG) << ss.str().c_str(); qCDebug(QGPGME_CONFIG_LOADING_LOG) << ss.str().c_str();
} }
#endif #endif
#if 0 #if 0