2

I am running Junit testcase with sl4j loggers, But I dont see loggers getting printed on console/file at all. I have some generated classes where the flow goes while debugging and hence I cant change the implementation. Here is the error in console : SLF4J: No SLF4J providers were found. SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details. SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8. SLF4J: Ignoring binding found at [jar:file:/C:/Users/A321300/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.11.2/log4j-slf4j-impl-2.11.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.

I am using : import org.slf4j.Logger; import org.slf4j.LoggerFactory;

Can somebody pls help with the resolution.

Naman
32.6k32 gold badges238 silver badges383 bronze badges
asked Jun 26, 2019 at 13:09

1 Answer 1

0

log4j-slf4j18-impl should be used with SLF4J 1.8.x releases or newer.

Applications that take advantage of the Java Module System should use SLF4J 1.8.x and log4j-slf4j18-impl.

Source: https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html

answered Sep 26, 2019 at 14:37

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.