[slf4j-user] Performance and the JDK1.4 logger
Brendan Nolan
brendan.nolan at gmail.com
Thu Jul 14 17:06:23 CEST 2011
Hi Ceki,
I don't believe that the fix made at
http://bugzilla.slf4j.org/show_bug.cgi?id=72
http://bugzilla.slf4j.org/show_bug.cgi?id=72 completely fixes this issue.
If the public log method on the JDK14LogAdapter is called is will still make
a call to the private log method even if the log level is below that
loggable.
If think the call to the private log method in the public log method should
be wrapped as so:
if (logger.isLoggable(julLevel)) {
log(callerFQCN, julLevel, message, t);
}
This will avoid unnecessary creation of the LogRecord object and filling in
of the caller data for messages that aren't going to be logged anyway.
Thanks
Brendan
--
View this message in context: http://slf4j.42922.n3.nabble.com/Performance-and-the-JDK1-4-logger-tp45826p3169384.html
Sent from the slf4j - user mailing list archive at Nabble.com.
More information about the slf4j-user
mailing list