[slf4j-dev] [JIRA] Updates for SLF4J-511: DefaultLogEventBuilder causes incorrect location information to be logged

QOS.CH (JIRA) noreply-jira at qos.ch
Sat Jun 19 10:23:00 CEST 2021


SLF4J / SLF4J-511 [Resolved]
DefaultLogEventBuilder causes incorrect location information to be logged

==============================

Here's what changed in this issue in the last few minutes.

There are 2 comments.

View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-511

==============================
 2 comments
------------------------------

Ceki Gülcü on 19/Jun/21 10:11 AM
[~rgoers at apache.org]

??This fix assumes that the user has not implemented their own logging wrapper around SLF4J and wants the location of their caller to be used as it will always result in the using the location of the caller of DefaultLogEventBuilder??

There are lots of opportunities for misunderstanding here. 

Let me be clear. 

1) SLF4J allows and encourages libraries to implement customized versions of {{LogEventBuilder}}. 

2) {{Log4jLoggerAdapter}} does *not *assume that location information should be computed systematically. It provides FQCN (fully qualified class name) of the immediate caller such that location information  can be computed _if so desired_.


------------------------------

Ralph Goers on 19/Jun/21 10:20 AM
I apologize. You are correct. I saw DefaultLogEventBuilder hard coded in Logger and forgot I can override the make method.


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the slf4j-dev mailing list