Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 8d945c2e authored by Stefan Brüns's avatar Stefan Brüns

[AppStream Runner] Reduce verbosity of log output

Summary:
Its rather pointless to spew an error message each time a query is done.
Output the warning message just once (on the default logging level), and
output further messages only at debug level.

Reviewers: #plasma, ngraham, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: apol, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D14806
parent e1c19ce4
......@@ -116,9 +116,15 @@ QList<AppStream::Component> InstallerRunner::findComponentsByString(const QStrin
{
QMutexLocker locker(&m_appstreamMutex);
QString error;
static bool warnedOnce = false;
static bool opened = m_db.load(&error);
if(!opened) {
qCWarning(RUNNER_APPSTREAM) << "Had errors when loading AppStream metadata pool" << error;
if (warnedOnce) {
qCDebug(RUNNER_APPSTREAM) << "Had errors when loading AppStream metadata pool" << error;
} else {
qCWarning(RUNNER_APPSTREAM) << "Had errors when loading AppStream metadata pool" << error;
warnedOnce = true;
}
}
return m_db.search(query);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment