Click or drag to resize

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
Syntax
public bool KeepFileOpen { 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