TimeBasedRollingPolicy stop rolling after running for some time

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

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@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@qos.ch http://mailman.qos.ch/mailman/listinfo/logback-user

Thanks a lot for the info. I will try to set the debug mode Thanks & Best Regards Feng Qiang Metropolitan Wireless International From: logback-user [mailto:logback-user-bounces@qos.ch] On Behalf Of Olexandr Demura Sent: Monday, September 4, 2017 6:56 PM To: logback users list <logback-user@qos.ch> Subject: Re: [logback-user] TimeBasedRollingPolicy stop rolling after running for some time 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@mwi.com.sg <mailto:fengqiang@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@qos.ch <mailto:logback-user@qos.ch> http://mailman.qos.ch/mailman/listinfo/logback-user
participants (3)
-
fengqiang
-
fengqiang@mwi.com.sg
-
Olexandr Demura