I have met the same issue, when i configure like below, logback can't remove old files before 3 days <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> |