Ceki Gülcü <listid <at> qos.ch> writes:
> Unfortunately, contrary to log4j, the JDK 1.4 API does not allow the 
> wrapper class, in this case SLF4J, to specify that the caller is one level 
> higher. Commons-logging circumvents this limitation by creating an 
> exception, parsing it and passing the information to JDK 1.4. However, this 
> approach can have quite a severe performance impact, which is why SLF4J did 
> not adopt the same approach.

Looking at the LogRecord code (at least in Java 5), this is what it does 
internally to infer the caller. 

However, the JDK 1.4 API does allow this. Use Logger.log( LogRecord ), and you 
can call LogRecord.setSourceClassName() and LogRecord.setSourceMethodName() 
to explicitly set the classs/method.
-peter



_______________________________________________
user mailing list
[email protected]
http://slf4j.org/mailman/listinfo/user

Reply via email to