logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Payne <tpa...@perfectmarket.com>
Subject Re: TimeBasedRollingPolicy with hourly filenames not rolling over at midnight
Date Mon, 20 Oct 2008 16:59:28 GMT
Has anyone successfully used TimeBasedRollingPolicy? Would you be  
willing to share a working configuration? If I don't resolve this  
today, I'll revert to DailyRollingFileAppender and cron jobs to do the  
compression, a significantly less appetizing approach.

Thanks,
Tony

On Oct 17, 2008, at 10:33 AM, Tony Payne wrote:

> Here is my configuration:
>    <appender name="RA"
> class="org.apache.log4j.rolling.RollingFileAppender">
>      <param name="Append" value="true"/>
>      <rollingPolicy
> class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
>        <param name="FileNamePattern" value="__LOCAL_VAR__/logs/
> %d{yyyy/MM/dd/'race'-yyyyMMddHH}.log.gz"/>
>      </rollingPolicy>
>      <layout class="org.apache.log4j.PatternLayout">
>        <param name="ConversionPattern" value="%d{ISO8601}\t%m%n"/>
>      </layout>
>    </appender>
>
> This works fine during the day, rolling over at the top of the hour
> and compressing the older file. However, at midnight, it stops rolling
> over and all subsequent messages go to the last active log name. Is
> there something wrong with my configuration?

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message