Skip to content

Log messages appear to be trimmed when using PatternLayout %m%n #4088

@veenaBOL

Description

@veenaBOL

Description

We are observing that log messages are getting truncated when logged using Log4j, particularly when using the following configuration:

This impacts critical logs such as log.fatal(message, throwable) where the complete message or stack trace is not fully printed. This is particularly noticeable for fatal and error logs where the message size is significantly large.

Configuration

Version: 2.25.3

Operating system: macOS 15.6

JDK: OpenJDK 17.0.12

Reproduction

  1. Configure Log4j with:
  1. Log a message with a large string or exception:

  2. log.fatal("Large message...", throwable);
    Check the output logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting-for-userMore information is needed from the user

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions