SLF4J warning during mvn install


#1

The following warning is generated when building Strata with “mvn install”:

SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Tests run: 226, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.575 sec - in TestSuite

I am building from the command line and have placed version 1.7.23 of slf4j-nop.jar and slf4j-api.jar in my CLASSPATH. I expected the warning to be suppressed based on guidance found at the link above. However, I have not found a combination of slf4j jar files which eliminates the warning. The build succeeds, but I would still like to understand the cause of the warning and how Strata depends on SLF4J.

Has anyone resolved this issue?


#2

The slf4j-api is part of Strata. Applications using Strata have to include one of the implementations of the API, thats how SLF4J works.

The test cases are supposed to have slf4j-nop included, but perhaps one does not. I’m surprised that adding that to the classpath did not silence the message - we’ll take a look. Fortunately, the message is just for information and has no impact on Strata.