[logback-user] Urgent Technical Issue

Ayman Hammoudeh Ayman.Hammoudeh at Progressoft.com
Wed Sep 16 12:20:17 CEST 2009


Hello,

I have a problem with TimeBasedRollingPolicy and that is older files are not deleted when I set the MaxHistory property  let's say for example '2' it should delete files that are older than two days right??? But it doesn't delete any files!!!???

So my question  is why files older that 2 days from the current date are not deleted.

Here is my XML file:

<configuration>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>RollTimeTest.%d.log</FileNamePattern>
<!-- keep #days worth of history -->
<MaxHistory>2</MaxHistory>
</rollingPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{HH:mm:ss.SSS}[%thread] %-5level %logger{35} - %msg%n</Pattern>
</layout>
 </appender>
 <root level="debug">
 <appender-ref ref="FILE" />
 </root>
</configuration>

Any help would be appreciated.



Regards,
Ayman Hammoudeh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20090916/cd558f0b/attachment-0001.htm>


More information about the Logback-user mailing list