[logback-user] Log rotation every 12 hrs at noon and mid night

srinandina at gmail.com srinandina at gmail.com
Wed Jun 11 13:42:07 CEST 2014


I have defined TimeBasedRollingPolicy using:

        <rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- rollover every 12 hrs -->

<fileNamePattern>${log.dir}/app.log.%d{yyyy-MM-dd-a}</fileNamePattern>
        </rollingPolicy>

But the log file is being rotated only once a day at 12 AM.

Looking at the code PeriodicityType enum has an entry 'HALF_DAY' but is not
present in the valid list.

Is this supported by logback?

Thanks,
Srinivas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20140611/866dc7e0/attachment.html>


More information about the Logback-user mailing list