[logback-user] TimeBasedRollingPolicy stop rolling after running for some time

Olexandr Demura oleksander.demura at gmail.com
Mon Sep 4 12:55:55 CEST 2017


Have you checked logback status data?
You could turn on writing it to console by <configuration debug="true"> as
in https://logback.qos.ch/manual/configuration.html#dumpingStatusData
If it has problems with renaming or compression, e.g. caused by relative
base name of # in target name, it should be in status.
And compression is done asyncronously which means, in addition to it being
harder to read status logs, what it is not counted as failure if something
wrong there.


2017-09-01 11:46 GMT+03:00 fengqiang <fengqiang at mwi.com.sg>:

> Hello  we are using logback for our server.  one issue keeps on happening
> for
> more than one year. We are using TimeBasedRollingPolicy, the logback works
> well when server starts and the log rolls according to size and date
> correctly. However it stops rolling after running for some time (1 or 2
> weeks) and the log file become extremely huge, 1 or 2 GB.  Recently I found
> it started when we copied logs from the server, then the rolling stop, the
> size of all the log files in the folder increase without stop.  my logback
> configuration is as follows:
> <configuration  scan="true" scanPeriod="300 seconds">
>
>         <appender name="DATAMGR_FILE"
> class="ch.qos.logback.core.rolling.RollingFileAppender">
>                 <file>../log/datamgr.log</file>
>
>                 <rollingPolicy class="ch.qos.logback.core.rolling.
> TimeBasedRollingPolicy">
>
> <FileNamePattern>../log/%d{yyyy-MM-dd,aux}/#%i.datamgr.%
> d{yyyy-MM-dd}.log.zip</FileNamePattern>
>                   <maxHistory>60</maxHistory>
>                   <timeBasedFileNamingAndTriggeringPolicy
> class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
>                         <maxFileSize>5MB</maxFileSize>
>                   </timeBasedFileNamingAndTriggeringPolicy>
>                   <cleanHistoryOnStart>true</cleanHistoryOnStart>
>                 </rollingPolicy>
>
>                 <layout class="ch.qos.logback.classic.PatternLayout">
>                   <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS}; [%thread];
> %-5level;
> %class{30}.%method:%line; %msg%n</Pattern>
>                 </layout>
>         </appender>
>
>          <logger name="com.mwi.cad.datamgr" level="info"
> additivity="false">
>                 <appender-ref ref="DATAMGR_FILE" />
>          </logger>
> </configuration>
>
> Anybody could give me some idea what I should do to solve this problem.  Is
> there any work around I can do? any enlightenment would be greatly
> appreciated!
>
>
>
> --
> Sent from: http://logback.10977.n7.nabble.com/Users-f3.html
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20170904/7ea904ca/attachment.html>


More information about the logback-user mailing list