Hello Keith,
At this time, the TimeBasedRollingPolicy does not provide MinIndex and
MaxIndex, and
thus does not delete any archived log files.
This is something that we have not discussed yet, so feel free to add a bug report
for enhancement[1] if you need this feature.
Cheers,
Sébastien
[1]http://logback.qos.ch/bugreport.html
Keith wrote:
I am looking to use RollingFileAppender and TimeBasedRollingPolicy to
implement my solution of rotating logs and compressing them each day.
The configuration looks something like that:
<configuration>
<appender name="FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>logFile.log</File>
*<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<FileNamePattern>logFile.%d{yyyy-MM-dd}.log</FileNamePattern>
</rollingPolicy>*
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</Pattern>
</layout>
</appender>
<root>
<level value="debug" />
<appender-ref ref="FILE" />
</root>
</configuration>
However, I would only like to keep seven compressed daily logs only. How
do I specify such an option in configuration file? Will I be able to use
MaxIndex and MinIndex?
Thanks
Keith
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user
--
Sébastien Pennec
[EMAIL PROTECTED]
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch/
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user