[slf4j-user] LocationAwareLogger#log(...) not working with slf4j-jdk14.jar

O.K.U. oku at olive.plala.or.jp
Tue Mar 12 16:26:28 CET 2019


Hello everyone.

I think that  "LocationAwareLogger#log(...)" function with "slf4j-jdk14.jar" 
is not working.

logger.log(null, "test.Test", INFO_INT , "Hello {}", "World");
prints "Hello {}", not  "Hello World".

JDK14LoggerAdapter.java,
"argArray" parameter is not used in the function.
------------------------------------------------------------------------------------------------------------------------------------------------
public void log(Marker marker, String callerFQCN, int level, String message, 
Object[] argArray, Throwable t) {
        Level julLevel = slf4jLevelIntToJULLevel(level);
        // the logger.isLoggable check avoids the unconditional
        // construction of location data for disabled log
        // statements. As of 2008-07-31, callers of this method
        // do not perform this check. See also
        // http://jira.qos.ch/browse/SLF4J-81
        if (logger.isLoggable(julLevel)) {
            log(callerFQCN, julLevel, message, t);
        }
}
------------------------------------------------------------------------------------------------------------------------------------------------

Is this correct?

--
I'm Sorry , and thanks for reading my poor English.



More information about the slf4j-user mailing list