 | FileTargetKeepFileOpen Property |
Gets or sets a value indicating whether to keep log file open instead of opening and closing it on each logging event.
Namespace:
NLog.Targets
Assembly:
NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntaxpublic bool KeepFileOpen { get; set; }
Public Property KeepFileOpen As Boolean
Get
Set
Dim instance As FileTarget
Dim value As Boolean
value = instance.KeepFileOpen
instance.KeepFileOpen = value
member KeepFileOpen : bool with get, set
Property Value
Type:
Boolean
Remarks
Default: .
KeepFileOpen = gives the best performance, and ensure the file-lock is not lost to other applications.
KeepFileOpen = gives the best compatibility, but slow performance and lead to file-locking issues with other applications.
See Also