logging-log4j2
logging-log4j2 copied to clipboard
log messages with last parameter being a Throwable log a warning
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