-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
file-archivingIssues with archiving with the file targetIssues with archiving with the file targetfile-targetquestion
Milestone
Description
NLog version: 6.0.1
Platform: .NET9 on Windows 11 24H2 and Ubuntu 24.04
Current NLog config (xml or C#, if relevant)
var fileTarget = new FileTarget("logfile") {
FileName = Path.GetFullPath(Path.Combine(LogPath, "bot.log")),
ArchiveEvery = FileArchivePeriod.Day,
ArchiveSuffixFormat = ".{1:yyyyMMdd}.{0:0}",
MaxArchiveDays = 30,
KeepFileOpen = true,
AutoFlush = false,
OpenFileFlushTimeout = 1,
Layout = "…",
};- What is the current result?
- On Windows:
bot..1.log - On Linux:
bot..250705.log(???)
- On Windows:
- What is the expected result?
I'd expect to seebot.20250705.0.logon all platforms - Did you check the Internal log?
No - Please post full exception details (message, stacktrace, inner exceptions)
- Are there any workarounds? yes/no
- Is there a version in which it worked?
I just want consistent naming after upgrading from v5 - Can you help us by writing a unit test?
Metadata
Metadata
Assignees
Labels
file-archivingIssues with archiving with the file targetIssues with archiving with the file targetfile-targetquestion