Click or drag to resize

FileTargetFileName Property

Gets or sets the name of the file to write to.

Namespace:  NLog.Targets
Assembly:  NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax
public Layout FileName { get; set; }

Property Value

Type: Layout
Remarks
This FileName string is a layout which may include instances of layout renderers. This lets you use a single target to write to multiple files.
Examples
The following value makes NLog write logging events to files based on the log level in the directory where the application runs.
1${basedir}/${level}.log
All Debug messages will go to Debug.log, all Info messages will go to Info.log and so on. You can combine as many of the layout renderers as you want to produce an arbitrary log file name.
See Also