[logback-user] log files are not rolling on windows 2012

Sasi Kishore K sasikishore.k at gmail.com
Wed Feb 18 13:14:06 CET 2015


Hi,

I have created following appender in logback.xml file. The log files are
getting created but the logs are not rolling over. It is on 2012 server
with tomcat.

    <appender name="DEFAULT_APPENDER" class="ch.qos.logback.core.
rolling.RollingFileAppender">

        <file>${APP_HOME}/logs/App.log</file>
        <encoder>
            <pattern>%-5level %d{MM/dd HH:mm:ss.SSS} [%thread] %logger{20}
%msg%n</pattern>
        </encoder>

        <rollingPolicy
class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <fileNamePattern>${APP_HOME}/logs/App.log.%i</fileNamePattern>
            <minIndex>1</minIndex>
            <maxIndex>5</maxIndex>
        </rollingPolicy>

        <triggeringPolicy
class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>5MB</maxFileSize>
        </triggeringPolicy>

But with below option ,

<fileNamePattern> ${APP_HOME}/logs/App.log.%i.zip </fileNamePattern>

With zip option for rolling the there are 5 log zip files are created but
all of them has same data. The actual log is growing.

Please let me know what may be the issue.

Thanks
Sasi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20150218/3385bbd8/attachment.html>


More information about the Logback-user mailing list