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)
_______________________________________________
logback-dev mailing list
logback-dev@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-dev

Reply via email to