Skip to content

log messages with last parameter being a Throwable log a warning #3726

Open
@flocsy

Description

@flocsy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting-for-userMore information is needed from the user

    Type

    No type

    Projects

    Status

    Waiting for user

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions