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

O.K.U. oku at olive.plala.or.jp
Tue May 14 18:06:12 CEST 2019


Hello everyone.

I posted same message to slf4j-user mailing list 2 months ago, but I have no 
answer yet.

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

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

prints "Hello {}", not  "Hello World".

in 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 a bug?

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



More information about the slf4j-dev mailing list