From 9be9431970d83822d06f0a4e4edbe621bea102a3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 22 Sep 2021 01:41:28 +0200 Subject: [PATCH] [libcalamares] Give Logger::Once more flexibility --- src/libcalamares/utils/Logger.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libcalamares/utils/Logger.h b/src/libcalamares/utils/Logger.h index 871cc6fb3..1fd534d04 100644 --- a/src/libcalamares/utils/Logger.h +++ b/src/libcalamares/utils/Logger.h @@ -310,6 +310,14 @@ public: } friend CDebug& operator<<( CDebug&&, const Once& ); + /** @brief Restore the object to "fresh" state + * + * It may be necessary to allow the Once object to stream the + * function header again -- for instance, after logging an error, + * any following debug log might want to re-introduce the header. + */ + void refresh() { m = true; } + private: mutable bool m = false; };