Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.8.1
-
None
-
None
Description
Following the docs about RollingRandomAccessFileAppender with a DirectWrite rollover, the config should be:
<RollingRandomAccessFile append="true" filePattern="application.log.%i" name="json-log"> <filters> <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/> </filters> <PatternLayout> <Pattern>%m%n</Pattern> </PatternLayout> <Policies> <SizeBasedTriggeringPolicy size="10 MB"/> </Policies> <DirectWriteRolloverStrategy maxFiles="10"/> </RollingRandomAccessFile>
But then console shows:
2017-06-01 14:31:04,396 main ERROR No filename was provided for FileAppender with name json-log 2017-06-01 14:31:04,406 main ERROR Null object returned for RollingRandomAccessFile in appenders. 2017-06-01 14:31:04,417 main ERROR Unable to locate appender "json-log" for logger config "root"
If adding a fileName parameter, the logger can be used but the file is not rolling (same as LOG4J2-1906).