Skip to content

Commit a9c7dd1

Browse files
committed
NLog v6 - FileTarget with ArchiveSuffixFormat
1 parent 6366847 commit a9c7dd1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

_posts/2025-04-29-nlog-6-0-major-changes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ NLog FileTarget no longer has the following archive-options:
7373
The `ArchiveSuffixFormat`-option has been introduced to replace `{#}`, and instead of specifying
7474
`archiveFilename="LogFile_{##}.txt"` then one should specify `archiveFilename="LogFile.txt"` with `archiveSuffixFormat="_{1:yyyyMMdd}_{0:00}"`.
7575
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+
To make the suffix as predictable as possible to help simplify the file-wildcard-logic, then it has no NLog Layout-logic
77+
and is just a simple `string.Format` with support for these place-holders:
7778
- `{0}` - The archive sequence-number. Supports format option `{0:000}`.
7879
- `{1}` - The archive created-datetime. Supports format option `{1:yyyyMMdd}` (Only works when also specifying `archiveFileName="..."`).
7980

0 commit comments

Comments
 (0)