Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
1.2.3
Description
Log files don't rotate if fileNamePattern contains directory name and file name with date pattern.
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<Pattern>%level %date [%thread] [%file:%line] %msg%n</Pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>/data/logs/api/app/%d{yyyy-MM-dd}/api.%d{yyyy-MM-dd-HH-mm}.log</fileNamePattern>
<maxHistory>240</maxHistory>
</rollingPolicy>
</appender>
It starts working fine , if date formatted directory is removed from fileNamePattern.
<fileNamePattern>/data/logs/api/app/api.%d{yyyy-MM-dd-HH-mm}.log</fileNamePattern>