今天在做Quartz2.1.7的example4时,引入的日志包包括log4j-api,log4j-core,log4j-web,slf4j-api,但在编译时出现异常,如下图所示,
官方文档时这样说的:
This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem.
但考虑到这个例子要输出日志,故不能选slf4j-nop,实战中我选择了slf4j-simple.jar包。