-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
file-archivingIssues with archiving with the file targetIssues with archiving with the file targetfile-targetquestion
Description
nlog version
NLog version: 6.0.6
Platform: .NET8
what happened
with settings
"file": {
"type": "File",
"fileName": "${basedir}/logs/nlog.log",
"layout": "${longdate} [${level}] ${logger} ${message} ${exception} | ${aspnet-request-url:includePort=true:includeQueryString=true} ${aspnet-traceidentifier} ${newline}",
"archiveAboveSize": 200000000,
"maxArchiveFiles": 100,
"archiveNumbering": "DateAndSequence",
"archiveDateFormat": "yyyyMMdd",
"archiveEvery": "Day",
"archiveSuffixFormat": "_{1:yyyyMMdd}_{0}",
"archiveOldFileOnStartup": true
}the archived file name will be nlog20151216_0.log
but when remove the old archiveNumbering and archiveDateFormat
eg.
"file": {
"type": "File",
"fileName": "${basedir}/logs/nlog.log",
"layout": "${longdate} [${level}] ${logger} ${message} ${exception} | ${aspnet-request-url:includePort=true:includeQueryString=true} ${aspnet-traceidentifier} ${newline}",
"archiveAboveSize": 200000000,
"maxArchiveFiles": 100,
//"archiveNumbering": "DateAndSequence",
//"archiveDateFormat": "yyyyMMdd",
"archiveEvery": "Day",
"archiveSuffixFormat": "_{1:yyyyMMdd}_{0}",
"archiveOldFileOnStartup": true
}then the the archived file name will be nlog_20151216_0.log
compare
nlog20151216_0.lognlog_20151216_0.log
Metadata
Metadata
Assignees
Labels
file-archivingIssues with archiving with the file targetIssues with archiving with the file targetfile-targetquestion