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
#include "config.h"
#endif
@ -9,6 +7,8 @@
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
Q_LOGGING_CATEGORY(QGPGME_LOG, "gpg.qgpgme", QtWarningMsg)
Q_LOGGING_CATEGORY(QGPGME_CONFIG_LOADING_LOG, "gpg.qgpgme.config_loading", QtInfoMsg)
#else
Q_LOGGING_CATEGORY(QGPGME_LOG, "gpg.qgpgme")
Q_LOGGING_CATEGORY(QGPGME_CONFIG_LOADING_LOG, "gpg.qgpgme.config_loading")
#endif

View File

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

View File

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