Skip to content

Commit 621e1d9

Browse files
committed
NLog v6 not supporting ArchiveNumbering Rolling
1 parent 5306411 commit 621e1d9

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,31 @@ Alternative options for replacing `EnableArchiveFileCompression = true`:
103103
- Use the new nuget-package [NLog.Targets.GZipFile](https://www.nuget.org/packages/NLog.Targets.GZipFile) where GZipFileTarget writes directly to a compressed log-file using `GZipStream`.
104104
- Use the legacy nuget-package [NLog.Targets.ConcurrentFile](https://www.nuget.org/packages/NLog.Targets.ConcurrentFile) that is the original NLog v5 FileTarget with all features and complexity.
105105

106+
### NLog FileTarget without ArchiveNumbering Rolling
107+
108+
NLog FileTarget no longer supports `ArchiveNumbering`-option with rolling behavior, that prevented ever increasing archive sequence-numbers.
109+
110+
There are some alternative options available:
111+
112+
- `FileName = "LogFile_${date:format=ddd}.txt"` (Combined with `MaxArchiveDays = 6`)
113+
- LogFile_Tue.txt
114+
- LogFile_Wed.txt
115+
- LogFile_Thu.txt
116+
117+
- `ArchiveSuffixFormat = "_{1:ddd}"` (Combined with `MaxArchiveFiles = 7`)
118+
- LogFile.txt (Newest file)
119+
- LogFile_Tue.txt
120+
- LogFile_Wed.txt
121+
- LogFile_Thu.txt
122+
123+
- `ArchiveSuffixFormat = "_{1:yyyyMMdd}"` (Combined with `MaxArchiveFiles = 10`)
124+
- LogFile.txt (Newest file)
125+
- LogFile_20250429.txt
126+
- LogFile_20250430.txt
127+
- LogFile_20250501.txt
128+
129+
If none of these approaches fit your needs, the legacy NuGet package [NLog.Targets.ConcurrentFile](https://www.nuget.org/packages/NLog.Targets.ConcurrentFile) is still available. It contains the original NLog v5 FileTarget implementation, including its full feature set and complexity.
130+
106131
### NLog FileTarget without ConcurrentWrites
107132

108133
NLog FileTarget no longer supports `ConcurrentWrites`-option, where multiple processes running

0 commit comments

Comments
 (0)