 | FileTargetArchiveFileName Property |
Legacy archive logic where file-archive-logic moves active file to path specified by
ArchiveFileName, and then recreates the active file.
Use
ArchiveSuffixFormat to control suffix format, instead of now obsolete token {#}
Namespace:
NLog.Targets
Assembly:
NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntaxpublic Layout? ArchiveFileName { get; set; }
Public Property ArchiveFileName As Layout
Get
Set
Dim instance As FileTarget
Dim value As Layout
value = instance.ArchiveFileName
instance.ArchiveFileName = value
member ArchiveFileName : Layout with get, set
Property Value
Type:
Layout
Remarks
Default:
.
Archive file-move operation only works if
FileName is static in nature, and not rolling automatically because of ${date} or ${shortdate} .
Legacy archive file-move operation can fail because of file-locks, so file-archiving can stop working because of environment issues (Other applications locking files).
Avoid using
ArchiveFileName when possible, and instead rely on only using
FileName and
ArchiveSuffixFormat.
See Also