[
https://issues.apache.org/jira/browse/LOG4J2-2897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kevin Grunenberg closed LOG4J2-2897.
------------------------------------
> Error creating rolling file with dated folder
> ---------------------------------------------
>
> Key: LOG4J2-2897
> URL: https://issues.apache.org/jira/browse/LOG4J2-2897
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.11.2
> Reporter: Kevin Grunenberg
> Priority: Major
> Labels: RollingFileAppender
> Fix For: 2.14.0
>
>
> 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
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)