You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2025-04-29-nlog-6-0-major-changes.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,9 +70,10 @@ NLog FileTarget no longer has the following archive-options:
70
70
- ArchiveFileKind - Removed because it is now implicit.
71
71
- FileNameKind - Removed because it is now implicit.
72
72
73
-
The `ArchiveSuffixFormat`-option has been introduced to handle `{#}`, and instead of specifying
74
-
`archiveFilename="LogFile.{##}.txt"` then one should specify `archiveFilename="LogFile.txt"` with `archiveSuffixFormat="{1:yyyyMMdd}_{0:00}"`.
75
-
The `ArchiveSuffixFormat`-option doesn't support NLog Layout, and works like `string.Format` and supports these place-holders:
73
+
The `ArchiveSuffixFormat`-option has been introduced to replace `{#}`, and instead of specifying
74
+
`archiveFilename="LogFile_{##}.txt"` then one should specify `archiveFilename="LogFile.txt"` with `archiveSuffixFormat="_{1:yyyyMMdd}_{0:00}"`.
75
+
The `ArchiveSuffixFormat`-option specifies the filename-suffix to apply, when the archive-logic is rolling to the next file.
76
+
It is intended to be very basic to simplify the file-wildcard-logic, and has no NLog Layout-logic. Instead it works like `string.Format` with support for these place-holders:
76
77
-`{0}` - The archive sequence-number. Supports format option `{0:000}`.
77
78
-`{1}` - The archive created-datetime. Supports format option `{1:yyyyMMdd}` (Only works when also specifying `archiveFileName="..."`).
0 commit comments