Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.3.0-alpha5
-
<appender name="FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>TRACE</level>
</filter>
<rollingPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${LOG_HOME}/%d{yyyyMMdd}agent%i.log
</fileNamePattern>
<maxFileSize>16MB</maxFileSize>
<maxHistory>1</maxHistory>
<totalSizeCap>1GB</totalSizeCap>
<historyAsFileCount>true</historyAsFileCount>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
<encoder>
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender><appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>TRACE</level> </filter> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>${LOG_HOME}/%d{yyyyMMdd} agent %i.log </fileNamePattern> <maxFileSize>16MB</maxFileSize> <maxHistory>1</maxHistory> <totalSizeCap>1GB</totalSizeCap> <historyAsFileCount>true</historyAsFileCount> <cleanHistoryOnStart>true</cleanHistoryOnStart> </rollingPolicy> <encoder> <pattern>${LOG_PATTERN}</pattern> </encoder> </appender>
Description
The policy will not delete files older than a month, and shows other inconsistent behavior.
e.g. 20210429_agent_0.log will never be deleted.
It will also sometimes not remove any files at all, as you can see from the rest of the logs from May <-> 05.
To reproduce you can use the same policy as in the environment, and just copy and paste the same file as in the format with a date that goes a month or more back, they will not be removed.