Logging: HOTFIX restrict amount of logs in memory
This commit is contained in:
parent
3c9ce867d3
commit
d38c021685
@ -95,6 +95,7 @@ Public Class LogConfig
|
|||||||
Private Const FOLDER_NAME_LOG = "Log"
|
Private Const FOLDER_NAME_LOG = "Log"
|
||||||
|
|
||||||
Private Const FILE_KEEP_RANGE As Integer = 90
|
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 _failSafePath As String = Path.GetTempPath()
|
||||||
Private ReadOnly _basePath As String = _failSafePath
|
Private ReadOnly _basePath As String = _failSafePath
|
||||||
@ -579,7 +580,8 @@ Public Class LogConfig
|
|||||||
Dim memoryLog As New MemoryTarget() With {
|
Dim memoryLog As New MemoryTarget() With {
|
||||||
.Layout = LOG_FORMAT_DEBUG,
|
.Layout = LOG_FORMAT_DEBUG,
|
||||||
.Name = TARGET_MEMORY,
|
.Name = TARGET_MEMORY,
|
||||||
.OptimizeBufferReuse = True
|
.OptimizeBufferReuse = True,
|
||||||
|
.MaxLogsCount = MAX_MEMORY_LOG_COUNT
|
||||||
}
|
}
|
||||||
|
|
||||||
Return memoryLog
|
Return memoryLog
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user