 | FileTargetOpenFileCacheSize Property |
Gets or sets the maximum number of files to be kept open.
Namespace:
NLog.Targets
Assembly:
NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntaxpublic int OpenFileCacheSize { get; set; }
Public Property OpenFileCacheSize As Integer
Get
Set
Dim instance As FileTarget
Dim value As Integer
value = instance.OpenFileCacheSize
instance.OpenFileCacheSize = value
member OpenFileCacheSize : int with get, set
Property Value
Type:
Int32
Remarks
Default: 5 . Higher number might improve performance when single FileTarget
is writing to many files (such as splitting by loglevel or by logger-name).
Files are closed in LRU (least recently used) ordering, so files unused
for longest period are closed first. Careful with number higher than 10-15,
because a large number of open files consumes system resources.
See Also