[ 
https://issues.apache.org/jira/browse/LOG4J2-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17600629#comment-17600629
 ] 

ASF subversion and git services commented on LOG4J2-2975:
---------------------------------------------------------

Commit 8f63620875b7cc742a4c153101a875bf9df45227 in logging-log4j2's branch 
refs/heads/dependabot/maven/com.conversantmedia-disruptor-1.2.20 from Piotr P. 
Karwasz
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=8f63620875 ]

[LOG4J2-2975] Implements the SLF4J LoggingEventBuilder

This PR implements the SLF4J 2.0 `LoggingEventBuilder`, taking care of
preserving the caller information.

> SLF4J fluent API fails to capture call site location due to missing 
> LoggingEventAware implementation
> ----------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-2975
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2975
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: SLF4J Bridge
>    Affects Versions: 2.13.3
>            Reporter: Daniel Gray
>            Assignee: Piotr Karwasz
>            Priority: Major
>             Fix For: 2.19.0
>
>
> The logger outputs the wrong log line (120 for INFO, 117 for DEBUG, etc.) 
> instead of the line in the program that generated the log, when running with 
> the slf4j bridge. *This causes potential confusion when a person debugging 
> something is reading the logs as the line numbers are wrong!*
> I have prepared 2 simple CLI apps to show the correct behavior (with only 
> Log4J) and the incorrect behavior (with the SLF4J bridge). Both are using the 
> exact same configuration (log4j2.properties). The repositories of these 
> sample projects are:
> Good behavior with a pure log4j:
>  [https://github.com/danielthegray/log4j-nobugsample]
>  Wrong behavior with the slf4j bridge:
>  [https://github.com/danielthegray/slf4j-bugsample]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to