jj: Logging Version 0.0.0.3

This commit is contained in:
Jonathan Jenne
2018-10-08 16:42:26 +02:00
parent 513ee837fb
commit b92100e401
4 changed files with 89 additions and 29 deletions

17
Modules.Logging/Logger.vb Normal file
View 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