[logback-user] TimeBasedRollingPolicy
Ceki Gulcu
ceki at qos.ch
Wed Mar 18 22:14:47 CET 2009
Could you please enter a jira issue We'll continue the discussion within the
jira issue.
paha wrote:
>
> Ceki Gulcu wrote:
>> The first cron job launched after midnight will trigger rollover. Isn't
>> that the
>> behavior you are observing?
>> i wouldn't ask in that case :) . no it never rolls over. for the case if
>> you ask, my configuration
>
> <appender name="FILE"
> class="ch.qos.logback.core.rolling.RollingFileAppender">
>
> <rollingPolicy
> class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
>
> <FileNamePattern>/var/log/cgp/archive/${script.name}.%d.log.zip</FileNamePattern>
> <MaxHistory>30</MaxHistory>
> </rollingPolicy>
>
>
>
> <layout class="ch.qos.logback.classic.PatternLayout">
>
> </layout>
> </appender>
> <root level="info">
> <appender-ref ref="FILE"/>
> </root>
>
> Logback version - the last available
>
>
> Ceki Gulcu wrote:
>> By the way, for obvious reasons, triggering at midnight cannot happen
>> every 2
>> hours.
>> didn't get it. could you please explain? if it starts at 12-00 am, the
>> file modification time must be still from previous day, and roll over
>> should happen with the next event. doesn't it? anyway, it doesn't roll
>> over at all, even if script starts ones per day at for instance 14-30.
>
>
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
More information about the Logback-user
mailing list