| 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: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax public 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:
BooleanRemarks
KeepFileOpen = true gives the best performance, and ensure the file-lock is not lost to other applications.
KeepFileOpen = false gives the best compability, but slow performance and lead to file-locking issues with other applications.
See Also