You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2008/04/28 17:54:25 UTC

DO NOT REPLY [Bug 44888] problem in showing Filename and Line number in log file

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


Curt Arnold <ca...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




--- Comment #1 from Curt Arnold <ca...@apache.org>  2008-04-28 08:54:24 PST ---
The most common reason for class and line number extraction to fail is that the
class file was compiled without debug information.  However, nothing suggests
that you recompiled in the middle of collecting the log.

Unless somebody has run into this before, it seems unlikely that we'd be able
to diagnose the problem without more information.

The following information would be very helpful:

Does the problem occur with log4j 1.2.15?  It is possible that you are
encountering a bug that has already been fixed in the several years since log4j
1.2.8.

What JVM are you using (java -v)?  LocationInfo depends on parsing the output
of Throwable.printStackTrace() to determine the calling class and line number
and as such may be affected by differences in JVM's.  JDK 1.4 added more
reliable methods to access this information, but log4j still targets earlier
JDK's.

If you run your app under a debugger, you could place break points in the
returns within LocationInformation constructor.  When the extraction is working
properly, the constructor should exit after the last line.  Knowing which early
exit is used and the contents of the "s" variable would be key to identifying
the problem.

Can you provide a sample program that reproduces the defect?


-- 
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org