Home > Back-end >  Slf4j always output error information
Slf4j always output error information

Time:09-25

I am using httpclient and httpcore both jar, there is an associated slf4j, but always can output the following error message
SLF4J: Failed to load the 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.

This is what reason is caused? If I missed a relevant jar file?

CodePudding user response:

You can just log can play out, that it doesn't matter

CodePudding user response:

Slf4j - API is not found the logging implementation will output the information
Additional httpclient although have dependence on the log, but dependent should be Commons - logging, do not need to slf4j

CodePudding user response:

refer to the second floor waste seven years response:
slf4j - API didn't find the logging implementation will output the information
Additional httpclient although have dependence on the log, but dependent should be Commons - logging, don't need to slf4j

Packed in common not logging the jar, that how to solve the problem without logging implementation?
This is all the jar

CodePudding user response:

Saw the httpclient5 words did useless Commons logging - but with the slf4j
This is not an error, a few lines of information is slf4j tell you because had not found the logging implementation, using the default NOPLogger so, said don't use any logging implementation

must cancel this a few lines of information
Or simply introduced a slf4j version (1.7.25) same slf4j - simple package, this is a simple implementation slf4j, all logging activity will be output to the console
Or the introduction of a logging implementation framework, such as log4j log4j2 logback JCL jul, so you need to understand how these logging framework specific configuration
  • Related