You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (Jira)" <ji...@apache.org> on 2021/06/19 16:33:00 UTC

[jira] [Comment Edited] (LOG4J2-2975) SLF4J fluent API fails to capture call site location due to missing LoggingEventAware implementation

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

Ralph Goers edited comment on LOG4J2-2975 at 6/19/21, 4:32 PM:
---------------------------------------------------------------

Ceki provided a fix for [SLF4J-511|[https://jira.qos.ch/browse/SLF4J-511]]. However, I pointed out that it still didn't allow the logging wrappers to provide the information required so location information could properly be determined by them. He has reopened the issue.


was (Author: ralph.goers@dslextreme.com):
Ceki provided a fix for [SLF4J-511|[https://jira.qos.ch/browse/SLF4J-511].] However, I pointed out that it still didn't allow the logging wrappers to provide the information required so location information could properly be determined by them. He has reopened the issue.

> 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: Bug
>          Components: SLF4J Bridge
>    Affects Versions: 2.13.3
>            Reporter: Daniel Gray
>            Assignee: Ralph Goers
>            Priority: Major
>             Fix For: 1.5
>
>
> 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.3.4#803005)