Skip to content

Log4j1SyslogLayout javadoc documents a non-existent escapeNL option #4237

Description

@ppkarwasz

The class javadoc of org.apache.log4j.layout.Log4j1SyslogLayout lists an escapeNL attribute ("Pattern to use for replacing newlines"). This is a copy-paste artifact from the javadoc of o.a.l.l.core.layout.SyslogLayout. No such attribute exists on Log4j1SyslogLayout, its builder exposes no way to set one, and toSerializable() performs no newline handling at all.

The result is that an operator reading the documentation believes a mitigation is available and configurable when it is not.

Proposed change: remove the escapeNL entry from the javadoc. While there, review the rest of the attribute list for further attributes inherited from SyslogLayout's javadoc that the class does not actually implement.

This was reported by @August829.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationPull requests or issues that affect documentation

    Type

    No type

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions