Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Description
We are using logback 0.9.30. In our logback configuration we have the need to create an appender that rolls over every day and the archives are stored in a separate directory. <fileNamePattern> tag does not seem to create the missing directories in the path. However, <File> tag under the <appender> seems to work fine.
This is the sample configuration we have:
<appender name="ABC" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/var/abc/abc.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>/var/abc/abc-archive/abc.%d
.log.gz</fileNamePattern>
<maxHistory>365</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%msg%n</pattern>
</encoder>
</appender>
"/var/abc/abc-archive" directory doesn't exist on the file system and i would expect that logback would create the missing directory. Please let us know if there is any piece missing in the configuration that would do that job or if its a genuine bug and would get fixed sometime soon.