EDMIService: Add Logging to UpdateTraceLogging

This commit is contained in:
Jonathan Jenne 2021-04-06 17:09:55 +02:00
parent 33d3af4de8
commit 5218782131

View File

@ -133,15 +133,25 @@ Public Class WindowsService
End Sub
Private Sub UpdateTraceLogging()
' Changing Tracelevels programmatically,
' See: https://wcfpro.wordpress.com/2010/11/21/how-to-add-wcf-traces-programmatically/
Dim oTraceLevel = SourceLevels.Off
Try
' Changing Tracelevels programmatically,
' See: https://wcfpro.wordpress.com/2010/11/21/how-to-add-wcf-traces-programmatically/
_Logger.Debug("UpdateTraceLogging running..")
_Logger.Debug("SourceLevels is off by default")
If _ConfigManager.Config.Debug Then
oTraceLevel = SourceLevels.Warning
End If
Dim oTraceLevel = SourceLevels.Off
WcfTracesController.Instance.LevelController(oTraceLevel)
_Logger.Debug("Debug is currently set to {0}", _ConfigManager.Config.Debug)
If _ConfigManager.Config.Debug Then
oTraceLevel = SourceLevels.Warning
End If
_Logger.Debug("Setting TraceLevel to {0}", oTraceLevel)
WcfTracesController.Instance.LevelController(oTraceLevel)
Catch ex As Exception
_Logger.Warn("TraceLogging could not be updated!")
_Logger.Error(ex)
End Try
End Sub
Private Function StartFirebird() As Firebird