apache / apache/logging-log4j2

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

Open
#3,083 1 comment 1 reaction 0 assignees View on GitHub
appenders:Rolling enhancement
Dominant language
Java
Stars
3.6k
Forks
1.7k
Avg merge
21h 30m
Merged PRs (30d)
27

Description

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`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.