When we are using log4j as underlying logger, sl4j actually does double
checking of 'isErrorEnabled()' for every Log, if that LEVEL is enabled.
public void error(String format, Object arg) {
if (logger.isEnabledFor(Level.ERROR)) {
String msgStr = MessageFormatter.format(format,
Hello Srinivasan,
The logger.isEnabledFor(...) operation takes about 25 nanoseconds with log4j and
about 10 nanoseconds with logback. new InterpolatedMessage probably takes
longer
than that..
Srinivasan Raguraman wrote:
When we are using log4j as underlying logger, sl4j actually does double