[logback-dev] [JIRA] (LOGBACK-1338) SizeAndTimeBasedRollingPolicy do not delete the old files

QOS.CH (JIRA) noreply-jira at qos.ch
Thu Aug 24 17:31:00 CEST 2017


seenimurugan shanmugam created LOGBACK-1338:
-----------------------------------------------

             Summary: SizeAndTimeBasedRollingPolicy do not delete the old files 
                 Key: LOGBACK-1338
                 URL: https://jira.qos.ch/browse/LOGBACK-1338
             Project: logback
          Issue Type: Bug
          Components: logback-core
    Affects Versions: 1.1.10
            Reporter: seenimurugan shanmugam
            Assignee: Logback dev list


I configured the  archive file structure as specified by the below configuration

<appender name="SCHEDULER" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>$\{LOG_HOME}/scheduler.log</File>
<encoder>
<pattern>%d %p [%t] [%X\{serviceName}] [%X\{username}] %X\{someOtherName} %logger\{10} - %m%n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>$\{LOG_HOME}/archive/%d\{yyyy/MM/dd}/scheduler.%i.log.gz</fileNamePattern>
<maxHistory>5</maxHistory>
<totalSizeCap>2GB</totalSizeCap>
<maxFileSize>50MB</maxFileSize>
</rollingPolicy>
</appender>

 

The date and time is not attached to the file name but folder is created for each day. This does not delete the old files above 5 days old. 



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


More information about the logback-dev mailing list