[ https://issues.apache.org/jira/browse/LOG4J2-1928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16140288#comment-16140288 ]
ASF subversion and git services commented on LOG4J2-1928: --------------------------------------------------------- Commit 0b37ee7466284d6a012a092f7284d15c53b75803 in logging-log4j2's branch refs/heads/master from [~ralph_go...@dslextreme.com] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=0b37ee7 ] LOG4J2-1928 - Add support for DirectWriteRolloverStrategy to RollingRandomAcessFileAppender > RollingRandomAccessFileAppender with DirectWriteRolloverStrategy requires a > fileName > ------------------------------------------------------------------------------------ > > Key: LOG4J2-1928 > URL: https://issues.apache.org/jira/browse/LOG4J2-1928 > Project: Log4j 2 > Issue Type: Bug > Affects Versions: 2.8.1 > Reporter: Lucas Ventura Carro > Assignee: Ralph Goers > Fix For: 2.9 > > > Following the docs about > [RollingRandomAccessFileAppender|https://logging.apache.org/log4j/2.x/manual/appenders.html#RollingRandomAccessFileAppender] > with a [DirectWrite > rollover|https://logging.apache.org/log4j/2.x/manual/appenders.html#RolloverStrategies], > the config should be: > {code} > <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> > {code} > But then console shows: > {noformat} > 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" > {noformat} > If adding a {{fileName}} parameter, the logger can be used but the file is > not rolling (same as LOG4J2-1906). -- This message was sent by Atlassian JIRA (v6.4.14#64029)