Skip to content

adventure-slf4j doesn't look for throwable candidates on error level #1228

Open
@Ynverxe

Description

@Ynverxe

Since SLF4J 1.6, error methods like error(String, Object, Object) and error(String, Object...) attempt to find the throwable object related to the log event in the last passed argument. When LocationAwareLogger is used in WrappingComponentLoggerImpl, it calls the LocationAwareLogger#log method, which explicitly accepts the throwable related to the log event. Error methods overridden by WrappingComponentLoggerImpl that accept strings instead of components always pass null as the throwable argument, which prevents the throwable from being printed. This breaks the expected behavior of Logger, which is that the last argument must be printed if it's a throwable. https://www.slf4j.org/faq.html#paramException

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions