Logging: Show block logs in debug and info

This commit is contained in:
Jonathan Jenne 2020-12-17 15:07:06 +01:00
parent 2f4b8afd67
commit 975ab50e56

View File

@ -12,8 +12,10 @@ Public Class Logger
Public Sub NewBlock(blockId As String) Public Sub NewBlock(blockId As String)
Dim message As String = $"-----> Start of Block {blockId}" Dim message As String = $"-----> Start of Block {blockId}"
Dim logEventInfo As New LogEventInfo(LogLevel.Info, Name, message) Dim logEventInfo As New LogEventInfo(LogLevel.Info, Name, message)
Dim logEventDebug As New LogEventInfo(LogLevel.Debug, Name, message)
Dim WrapperType As Type = GetType(Logger) Dim WrapperType As Type = GetType(Logger)
Log(WrapperType, logEventDebug)
Log(WrapperType, logEventInfo) Log(WrapperType, logEventInfo)
End Sub End Sub
@ -21,8 +23,10 @@ Public Class Logger
Public Sub EndBlock() Public Sub EndBlock()
Dim message As String = $"<----- End of Block" Dim message As String = $"<----- End of Block"
Dim logEventInfo As New LogEventInfo(LogLevel.Info, Name, message) Dim logEventInfo As New LogEventInfo(LogLevel.Info, Name, message)
Dim logEventDebug As New LogEventInfo(LogLevel.Debug, Name, message)
Dim WrapperType As Type = GetType(Logger) Dim WrapperType As Type = GetType(Logger)
Log(WrapperType, logEventDebug)
Log(WrapperType, logEventInfo) Log(WrapperType, logEventInfo)
End Sub End Sub
End Class End Class