Juan Loman created LOG4J2-1878:
----------------------------------
Summary: Dates in filename for RollingRandomAccessFile appender
Key: LOG4J2-1878
URL: https://issues.apache.org/jira/browse/LOG4J2-1878
Project: Log4j 2
Issue Type: Improvement
Components: Appenders
Reporter: Juan Loman
The feature for using dates as part of the current logfile (by omitting the
filename attribute and using the filepattern instead) has been implemented for
{{RollingFileAppender}} but not for {{RollingRandomAccessFileAppender}}.
The following config should work:
{code:xml}
<RollingRandomAccessFile name="Application"
filePattern="logs/test.%d{yyyy-MM-dd-HH-mm}.log">
<PatternLayout pattern="%d{DATE} [%p] %X{RequestId} (%t) %c: %m%n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
</Policies>
<DirectWriteRolloverStrategy/>
</RollingRandomAccessFile>
{code}
Currently it emits {code}ERROR No filename was provided for FileAppender with
name Application{code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]