Description
Consider this configuration, with V 1.2.11 or trunk:
<file value="log.log" />
<appendToFile value="true" />
<rollingStyle value="Composite" />
<datePattern value=".yyyyMMdd-HHmm" />
<staticLogFileName value="true" />
<preserveLogFileNameExtension value="true" />
- Start an application (a verbose one, preferably) with it.
- Kill it immediately.
Log directory now looks like this
—
log.log
—
- Wait until we are in another minute
- Start application again
- Kill it immediately
Log directory now looks like this
—
log.log
log.log.20130122-2042
—
Didn't we say we want to preserveLogFileNameExtension?
Shouldn't the file name of the file rolled over be "log.20130122-2042.log"?
If the application weren't killed and restarted in another period,
everything were correct.
This happens when rolling over an old log file from a previous run upon application start. The line of this patch fixes it.
Attachments
Issue Links
- relates to
-
LOG4NET-378 Rolling log file is overwritten when application is restarted
- Closed