You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Ric Searle <ri...@yellowbrick-tracking.com> on 2013/09/04 13:35:32 UTC
FastRollingFile with DefaultRolloverStrategy not removing old log files
Hi,
I'm evaluating beta8, with the following appender defined...
<FastRollingFile name="SQL-FILE" fileName="/var/log/tomcat7/sql.log" filePattern="/var/log/tomcat7/rolled/sql-%d{yyyy-MM-dd_HHmm}.log" immediateFlush="true">
<PatternLayout pattern="%d %-20C{1} : %m (Thread: %t)%n" />
<SizeBasedTriggeringPolicy size="100 MB"/>
<DefaultRolloverStrategy max="10"/>
</FastRollingFile>
All works well, except that old log files aren't being deleted. I just had to delete 300x 100MB files.
Any idea what I've got wrong?
Thanks,
Ric Searle
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: FastRollingFile with DefaultRolloverStrategy not removing old log files
Posted by Gary Gregory <ga...@gmail.com>.
Can you checkout the trunk code, build it and test it with your case?
Gary
On Wed, Sep 4, 2013 at 7:35 AM, Ric Searle <
ric.searle@yellowbrick-tracking.com> wrote:
> Hi,
>
> I'm evaluating beta8, with the following appender defined...
>
> <FastRollingFile name="SQL-FILE" fileName="/var/log/tomcat7/sql.log"
> filePattern="/var/log/tomcat7/rolled/sql-%d{yyyy-MM-dd_HHmm}.log"
> immediateFlush="true">
> <PatternLayout pattern="%d %-20C{1} : %m (Thread: %t)%n" />
> <SizeBasedTriggeringPolicy size="100 MB"/>
> <DefaultRolloverStrategy max="10"/>
> </FastRollingFile>
>
> All works well, except that old log files aren't being deleted. I just had
> to delete 300x 100MB files.
>
> Any idea what I've got wrong?
>
> Thanks,
>
> Ric Searle
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory