Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Description
When SizeAndTimeBasedFNATP determines it's initial index, it will not increment the counter if <file> has not been specified for the FileAppender.
<appender name="DEBUG-FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- Use file format from rolling policy: http://logback.qos.ch/manual/appenders.html#TimeBasedRollingPolicy --> <!-- <file>${CONTEXT_DATA_PATH}/logs/server-debug.txt</file> --> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <pattern>${DEBUG_FILE_PATTERN}</pattern> </encoder> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <fileNamePattern>${CONTEXT_DATA_PATH}/logs/server/server-debug.%d{yyyy-MM-dd}.%i.txt.zip</fileNamePattern> <maxHistory>${DEBUG_FILE_MAX_HISTORY}</maxHistory> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>100MB</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>${DEBUG_FILE_LEVEL}</level> </filter> </appender>