From 80300e412c6e74815a0b8bd438685dbdffb81cc0 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 31 Jan 2022 23:27:35 +0100 Subject: [PATCH] [libcalamares] When logging extra lines to warning or error, suppress label Avoid logs like 23:29:57 [2]: void Config::setConfigurationMap(const QVariantMap&) WARNING: Configuration for *initialSwapChoice* is not one of the *userSwapChoices* WARNING: .. Choice "small" added. where the label is duplicated. --- src/libcalamares/utils/Logger.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libcalamares/utils/Logger.h b/src/libcalamares/utils/Logger.h index 0d7d5c870..25c19cf58 100644 --- a/src/libcalamares/utils/Logger.h +++ b/src/libcalamares/utils/Logger.h @@ -71,8 +71,11 @@ private: inline CDebug& operator<<( CDebug&& s, const FuncSuppressor& f ) { - s.m_funcinfo = nullptr; - s << f.m_s; + if ( s.m_funcinfo ) + { + s.m_funcinfo = nullptr; + s.m_msg = QString( f.m_s ); + } return s; }