[slf4j-user] Double Checking log level when logging with log4j

2008-10-23 Thread Srinivasan Raguraman
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,

Re: [slf4j-user] Double Checking log level when logging with log4j

2008-10-23 Thread Ceki Gulcu
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