SLF4J,即简单日志门面(Simple Logging Facade for Java),不是具体的日志解决方案,它只服务于各种各样的日志系统。按照官方的说法,SLF4J是一个用于日志系统的简单Facade,允许最终用户在 部署其应用时使用其所希望的日志系统。
SlF4J常见错误总结:
1.Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
添加 slf4j-api-1.6.6.jar
2.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.
添加 slf4j-nop-1.6.6.jar
3.SLF4J: Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError.
SLF4J: See also http://www.slf4j.org/codes.html#log4jDelegationLoop for more details.
删除:log4j-over-slf4j和slf4j-log4j12.jar