From 15d6cac42031b437c2a8ed56979a0ff966082910 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 25 Nov 2022 12:09:41 +0100 Subject: [PATCH] Logging: write log when debug flag is changed --- Logging/LogConfig.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Logging/LogConfig.vb b/Logging/LogConfig.vb index 7a063d5d..8a9d1458 100644 --- a/Logging/LogConfig.vb +++ b/Logging/LogConfig.vb @@ -481,6 +481,8 @@ Public Class LogConfig ''' Adds the Debug rule if true. ''' Adds the Trace rule if true. Private Sub ReloadConfig(Optional Debug As Boolean = False, Optional Trace As Boolean = False) + Dim oLogger = GetLogger() + ' Clear Logging Rules _config.LoggingRules.Clear() @@ -490,6 +492,9 @@ Public Class LogConfig ' Add debug rule, if configured If Debug = True Then _config.AddRule(LogLevel.Debug, LogLevel.Error, TARGET_DEBUG) + oLogger.Info("DEBUG Logging is now Enabled.") + Else + oLogger.Debug("DEBUG Logging is now Disabled.") End If If Trace = True Then