I found this while building a wrapper around log4j. All classes in my package call a factory to get a Tracer instance (which is nothing but a container object for a Category). Then a method call is made on the Tracer, which delegates it to the Category instance it contains. To ensure that the %C token for caller class identification works fine, (and does'nt print 'mypackage.Tracer' all the time) and to incorporate other functionality I had, I extended Category to create MyCategory, a corresponding MyLoggingEvent and MyCategoryFactory. Apart from other things, I also added this line in MyCategory.java: private static String FQCN = Tracer.class.getName(); which is "mypackage.Tracer". And to test this I wrote a TracerTest in the same package. When I ran it, the LocationInfo threw a NullPointerException. Coz, the last 2 lines in the Throwable object look like this: at mypackage.Tracer.log(Tracer.java:34) at mypackage.TracerTest.main(TracerTest.java:22) Line 116 of LocationInfo.java (revision 1.5) is: ibegin = s.lastIndexOf(fqnOfCallingClass); This causes the index to jump to the last line of the StackTrace, whereas the intention was to get it to the earlier line. (It only happens when the name the caller contains the name of our FQCN String. So Line 116 in LocationInfo.java should be changed to: ibegin = s.lastIndexOf(fqnOfCallingClass + "."); Cheers ____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=1 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]