apache / apache/logging-log4j2

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

Open
#4,088 5 comments 0 reactions 0 assignees View on GitHub
Stale waiting-for-user
Dominant language
Java
Stars
3.6k
Forks
1.7k
Avg merge
21h 30m
Merged PRs (30d)
27

Description

## 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:

```xml

```

2. Log a message with a large string or exception:

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

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.