From 8fe2e1f68a59ceaf6e6740ba92a4ade4da12455f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Mar 2021 21:22:20 +0100 Subject: [PATCH] [finished] Make the debug-log less cryptic --- src/modules/finished/Config.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/finished/Config.cpp b/src/modules/finished/Config.cpp index 5d824a8f3..d6d602db0 100644 --- a/src/modules/finished/Config.cpp +++ b/src/modules/finished/Config.cpp @@ -111,8 +111,8 @@ Config::onInstallationFailed( const QString& message, const QString& details ) void Config::doRestart( bool restartAnyway ) { - cDebug() << "mode=" << restartModes().find( restartNowMode() ) << " user?" << restartNowWanted() << "arg?" - << restartAnyway; + cDebug() << "mode=" << restartModes().find( restartNowMode() ) << " user wants restart?" << restartNowWanted() + << "force restart?" << restartAnyway; if ( restartNowMode() != RestartMode::Never && restartAnyway ) { cDebug() << Logger::SubEntry << "Running restart command" << m_restartNowCommand; @@ -124,9 +124,11 @@ Config::doRestart( bool restartAnyway ) void Config::doNotify( bool hasFailed, bool sendAnyway ) { + const char* const failName = hasFailed ? "failed" : "succeeded"; + if ( !sendAnyway ) { - cDebug() << "Notification failed?" << hasFailed << "not sent."; + cDebug() << "Notification not sent; completion:" << failName; return; } @@ -134,7 +136,7 @@ Config::doNotify( bool hasFailed, bool sendAnyway ) "org.freedesktop.Notifications", "/org/freedesktop/Notifications", "org.freedesktop.Notifications" ); if ( notify.isValid() ) { - cDebug() << "Sending notification of completion. Failed?" << hasFailed; + cDebug() << "Sending notification of completion:" << failName; QString title; QString message;