[logback-user] RollingFileAppender does not roll after max size exceeds
Ren, Kevin
Kevin.Ren at justice.govt.nz
Sun Oct 12 21:42:11 CEST 2014
Hi Amit,
That's my working config file
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>./application.log.%d{yyyy-MM-dd}</fileNamePattern>
<!--<fileNamePattern>./application.csv-%d{yyyy-MM-dd'T'HH_mm}</fileNamePattern>-->
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 100MB -->
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<MaxHistory>7</MaxHistory>
</rollingPolicy>
good luk,
Kevin
From: Logback-user [mailto:logback-user-bounces at qos.ch] On Behalf Of amit shah
Sent: Friday, 10 October 2014 7:56 p.m.
To: logback-user at qos.ch
Subject: [logback-user] RollingFileAppender does not roll after max size exceeds
Hello,
I am using using logback version 1.0.9 with slf4j 1.7.2. I see my log file not getting rolled over even after the maxFileSize exceeds. I see that the new logs are still logged to the same file and its size continuously increasing. My configuration is as below
<appender name="WEB_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>web.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>web%i.log</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>9</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>20MB</maxFileSize>
</triggeringPolicy>
<encoder>
<pattern>%date [%thread] %-5level %logger{36} %line - %msg%n</pattern>
</encoder>
</appender>
The current log file size is over 55 mb. I would like to know if there is any information that I could capture while this issue is seen in the production environment since I assume this would be a rare bug being seen.
Regards,
Amit.
------------------------------------------------------------------------------
Confidentiality notice:
This email may contain information that is confidential or legally privileged. If you have received it by mistake, please:
(1) reply promptly to that effect, and remove this email and the reply from your system;
(2) do not act on this email in any other way.
Thank you.
------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20141012/d51a408d/attachment.html>
More information about the Logback-user
mailing list