Skip to content

Log4j 2.x - RollingRandomAccessFileAppender missing "createOnDemand" attribute (although documented as valid) #3083

Open
@JWT007

Description

@JWT007

In the new Log4j 2.x online documentation:

https://logging.apache.org/log4j/2.x/manual/appenders/rolling-file.html

The configuration attribte 'createOnDemand' is documented as a common attribute for both RollingFileAppender and RollingRandomAccessFileAppender.

Looking at most current code (2.24.1) it seems to only be an attribute of the RollingFileAppender.

NOTE: I originally created a ticket for this on the JIRA to which @ppkarwasz mentioned that this is probably a bug.
https://issues.apache.org/jira/browse/LOG4J2-3690

If so, I assume that the attribute needs to be duplicated in RollingRandomAccessFileAppender.

Reading the documentation and looking at the code it almost seems like there is a missing link in the inheritence chain :)

class AbstractRollingFileAppender extends AbstractOutputStreamAppender

Metadata

Metadata

Assignees

No one assigned

    Labels

    appenders:RollingAffects log file rolling functionalityenhancementAdditions or updates to features

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions