http://bugzilla.slf4j.org/show_bug.cgi?id=13





------- Additional Comments From [EMAIL PROTECTED]  2006-01-27 11:20 -------

Looking at the source code for Logger, LogRecord and various formatter
in JDK 1.5, it appears that caller information is inferred when not
supplied by the user. More importantly, the call to inferCaller()
method in LogRecord is done only when other components, in particular
Formatter objects, invoke LogRecord.getSourceClass() or similar
methods.

Interestingly enough, both XMLFormatter and SimpleFormater invoke
LogRecord.getSourceClass() or similar methods. It follows that when
the default implemenation of JUL (the one shiping with the JDK) is in
use, then the probability of inferCaller() being invoked for every log
call is extremely high, as in 100%. So it is not inccorrect to say
that inferring the caller in org.slf4j.impl.JDK14Adapter does not add
cost relative to what would have been paid a little later.

However, when x4juli is in use, the above assumption no longer holds
true. As Boris mentions the patch may introdice significant additional
overhead depending on the configuration.

Agreed?


-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
dev mailing list
[email protected]
http://slf4j.org/mailman/listinfo/dev

Reply via email to