Reputation: 189786
If I use slf4j and the classpath doesn't contain a logger implementation, it defaults to a NOP logger operation. That's fine with me. But is there any way to suppress the initial error message?
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.
Upvotes: 6
Views: 1754
Reputation: 340883
There are several ways and workarounds to achieve this:
System.err
by calling System.setErr()
with some null implementation of PrintStream
Upvotes: 7