Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
Description
Deletion of old archived logs on rolling failes for index > 99.
We have a process which logs much, which results in more than 99 log files per day (config below), e.g.
snowball_POLL_MSG_SRV_xdebug-old-2011-09-13.110.log.zip.
On rolling event, only the first 99 were deleted, due to bug in
FileNamePattern::toRegex for index (Integer):
regEx: \d{1,2)
which means digits with max length of 2.
We need at least 3 digits:
regEx: \d{1,3)
better 4?
Workarounds like increasing file size, or hourly-rollover to hold index lower than 100 are not very wellcomed.
Thanks in advance,
Dieter Mueller.
config:
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- rollover daily -->
<fileNamePattern>${log.vm.file.prefix}_xdebug-old-%d
.%i.log.zip</fileNamePattern>
<maxHistory>1</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>20MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>