Logging: HOTFIX restrict amount of logs in memory

This commit is contained in:
Jonathan Jenne 2022-03-02 10:10:45 +01:00
parent 3c9ce867d3
commit d38c021685

View File

@ -95,6 +95,7 @@ Public Class LogConfig
Private Const FOLDER_NAME_LOG = "Log"
Private Const FILE_KEEP_RANGE As Integer = 90
Private Const MAX_MEMORY_LOG_COUNT As Integer = 1000
Private ReadOnly _failSafePath As String = Path.GetTempPath()
Private ReadOnly _basePath As String = _failSafePath
@ -579,7 +580,8 @@ Public Class LogConfig
Dim memoryLog As New MemoryTarget() With {
.Layout = LOG_FORMAT_DEBUG,
.Name = TARGET_MEMORY,
.OptimizeBufferReuse = True
.OptimizeBufferReuse = True,
.MaxLogsCount = MAX_MEMORY_LOG_COUNT
}
Return memoryLog