[slf4j-dev] [Bug 13] JDK14LoggerAdapter does not preserve source class name
bugzilla-daemon at gil.qos.ch
bugzilla-daemon at gil.qos.ch
Fri Jan 27 11:20:42 CET 2006
http://bugzilla.slf4j.org/show_bug.cgi?id=13
------- Additional Comments From listid at qos.ch 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.
More information about the slf4j-dev
mailing list