From ab22c834deae25b04ac8d7aca58def47cbbf241b Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 23 Aug 2018 14:33:46 +0200 Subject: [PATCH] jj: add LogFactory --- Modules.Logging/LogConfig.vb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Modules.Logging/LogConfig.vb b/Modules.Logging/LogConfig.vb index 297ebd72..e028b9a3 100644 --- a/Modules.Logging/LogConfig.vb +++ b/Modules.Logging/LogConfig.vb @@ -72,6 +72,8 @@ Public Class LogConfig Private ReadOnly failSafePath As String = Path.GetTempPath() Private ReadOnly basePath As String = failSafePath + Public ReadOnly Property LogFactory As LogFactory + Public Enum PathType As Integer AppData = 0 CurrentDirectory = 1 @@ -173,13 +175,18 @@ Public Class LogConfig config.AddRuleForOneLevel(LogLevel.Info, TARGET_DETAIL) ' Save config - LogManager.Configuration = config + LogFactory = New LogFactory With { + .Configuration = config + } + 'LogManager.Configuration = config ' Save log paths for files/directory LogDirectory = basePath LogFile = GetCurrentLogFilePath() End Sub + + ''' ''' Returns the full path of the current default log file. '''