Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.11.2
Description
I am trying to use the rolling appender to create a new log file each day in a dated folder. The initial file creation works fine but when the rollover is triggered a FileNotFound exception is thrown.
Config:
**
<Appenders>
<RollingFile name="RollingFileAppender"
filePattern="logDir/%d{yyyyMMdd}/processor.log">
<PatternLayout>
<Pattern>%d [%t] %-5level %logger{36}:%L - %msg%n%throwable</Pattern>
</PatternLayout>
<Policies>
<!-- the logs get rolled over into a date named log file every day (filePattern)-->
<TimeBasedTriggeringPolicyinterval="1"modulate="true"/>
</Policies>
<DirectWriteRolloverStrategy/>
</RollingFile>
</Appenders>
looks like it could be an easy fix by adding a mkDirs call in createOutputStream() of FileManager class
Attachments
Issue Links
- relates to
-
LOG4J2-2883 Size based rolling stops working after first time base rolling
- Resolved