logging-log4j2 icon indicating copy to clipboard operation
logging-log4j2 copied to clipboard

log messages with last parameter being a Throwable log a warning

Open flocsy opened this issue 4 months ago • 1 comments

Description

String foo = "FOO"; try { throw new Exception("test"); } catch {Throwable t) { logger.info("foo: {}", foo, t); }

creates a warning: found 1 argument placeholders, but provided 2 for pattern foo: {}

Configuration

Version: 2.24.0

Operating system: Linux, MacOS

JDK: coretto 21.0.7

Logs

found 1 argument placeholders, but provided 2 for pattern `foo: {}`

Reproduction

This was working in versions, up-to (including) 2.23.1, and is broken since version 2.24.0

It looks like it's related to https://github.com/apache/logging-log4j2/issues/2380

flocsy avatar Jun 11 '25 12:06 flocsy