https://issues.apache.org/bugzilla/show_bug.cgi?id=47014

           Summary: Method Name in log (%M) invalid for some callers when
                    using Category.log(...)
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Other
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=23479)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23479)
Bundled Maven project with unit tests that demonstrat issue in console

Overview: 
The method name returned by %M can be invalid when using the following method:

Category.log(String callerFQCN, Priority level, Object message, Throwable t);

>From a class that has a fully qualified name that is a substring of the
log4j.Logger's category.


Additional Information: 

Attached maven project demonstrates scenario, prints messages to console.

Proposed Fix:
Add "." to end fqnOfCallingClass in LocationInfo before searching stacktrace
for method.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to