From 19fcfc7f440d630822106b4df8e7afa166e078dc Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Sun, 5 May 2024 21:41:05 +0200 Subject: [PATCH] SetLevel returns old level --- libsrc/core/logging.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libsrc/core/logging.hpp b/libsrc/core/logging.hpp index 38993203..0e010b1a 100644 --- a/libsrc/core/logging.hpp +++ b/libsrc/core/logging.hpp @@ -42,7 +42,12 @@ namespace ngcore static NGCORE_API level::level_enum global_level; public: - static void SetGlobalLoggingLevel( level::level_enum level ) { global_level = level; } + static auto SetGlobalLoggingLevel( level::level_enum level ) + { + auto oldval = global_level; + global_level = level; + return oldval; + } std::shared_ptr logger;