[logback-dev] [JIRA] (LOGBACK-1372) SizeAndTimeBasedRollingPolicy can't remove old logs files

QOS.CH (JIRA) noreply-jira at qos.ch
Thu Jan 18 04:47:00 CET 2018


vincentliu created LOGBACK-1372:
-----------------------------------

             Summary: SizeAndTimeBasedRollingPolicy can't remove old logs files
                 Key: LOGBACK-1372
                 URL: https://jira.qos.ch/browse/LOGBACK-1372
             Project: logback
          Issue Type: Bug
          Components: logback-classic, logback-core
    Affects Versions: 1.2.0, 1.1.8, 1.1.7
            Reporter: vincentliu
            Assignee: Logback dev list
            Priority: Critical


I configured logback.xml like below, but it can't remove old log files before 3 days  or total size cap exceed 10MB.

<appender name="test" class="ch.qos.logback.core.rolling.RollingFileAppender">
 <file>/var/log/test.log</file>
 <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
 <fileNamePattern>/var/log/test.%d\{yyyy-MM-dd}.%i.log.zip</fileNamePattern>
 <maxFileSize>1MB</maxFileSize>
 <maxHistory>3</maxHistory>
 <totalSizeCap>10MB</totalSizeCap>
 </rollingPolicy>
 <encoder>
 <Pattern>$\{ENCODER_PATTERN}</Pattern>
 <charset>UTF-8</charset>
 </encoder>
 </appender>

 

 

 



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the logback-dev mailing list