https://issues.apache.org/bugzilla/show_bug.cgi?id=45364
Summary: LocationInformation Incorrectly Parses Location when
Similar Named Classes Exist in Stack Trace
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]
I uncovered this issue when testing a logging wrapper class using JUnit. The
issue occurs when the logging wrapper class I created (called
"com.somecompany.util.Logger") is called from the test class (called
"com.somecompany.util.LoggerTest"). The wrapper class appropriately passes its
fully qualified class name (FQCN) to Log4J, and this name is used to search the
stack trace for the last instance of the class. Unfortunately, because
com.somecompany.util.LoggerTest includes the substring
com.somecompany.util.Logger and appears earlier in the stack trace, its stack
frame is being used as the one for the FQCN and the wrong location information
is being populated.
--
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]