[slf4j-dev] [Bug 297] New: Pattern logging caller name are logging org.slf4j.helpers.MarkerIgnoringBase if marker active

bugzilla-daemon at qos.ch bugzilla-daemon at qos.ch
Wed Mar 13 11:33:08 CET 2013


http://bugzilla.slf4j.org/show_bug.cgi?id=297

           Summary: Pattern logging caller name are logging
                    org.slf4j.helpers.MarkerIgnoringBase if marker active
           Product: SLF4J
           Version: 1.7.x
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: Core API
        AssignedTo: slf4j-dev at qos.ch
        ReportedBy: p3consulting at gmail.com


When a marker is active (when calls are made to the method taking a Marker as
1st parameter: log.debug(curMarker, ...) )
then the method name logged by pattern %l and %M are abused by the caller stack
not being identical to the usual one, this makes the caller always a method of
org.slf4j package not a method of the user code.

Example you will get:

org.slf4j.helpers.MarkerIgnoringBase.debug(MarkerIgnoringBase.java:72)

instead of

my.company.package.LogGenerator.logError(LogGenerator.java:72)

But note that the line number seems to be correct.

(tested in 1.7.2 and 1.6.2)

-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the slf4j-dev mailing list