jj: Logging Version 0.0.0.3
This commit is contained in:
17
Modules.Logging/Logger.vb
Normal file
17
Modules.Logging/Logger.vb
Normal file
@@ -0,0 +1,17 @@
|
||||
Imports NLog
|
||||
|
||||
Public Class Logger
|
||||
Inherits NLog.Logger
|
||||
|
||||
''' <summary>
|
||||
''' Prints a preformatted Block including a block identifier
|
||||
''' </summary>
|
||||
''' <param name="blockId">A unique Identifier for this block, eg. DocId, FullPath, ..</param>
|
||||
Public Sub NewBlock(blockId As String)
|
||||
Dim message As String = $"=========={vbTab}{vbTab}Start of Block {blockId}{vbTab}{vbTab}=========="
|
||||
Dim logEventInfo As New LogEventInfo(LogLevel.Info, Name, message)
|
||||
Dim WrapperType As Type = GetType(Logger)
|
||||
|
||||
Log(WrapperType, logEventInfo)
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user