使用log4j時單獨使用日誌沒有問題,可是加入Spring quartz後便打出了以下錯誤html
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.spa
我不是處女座,但看着仍是有點不太舒服。so~找解決辦法。添加一個slf4j的依賴便可,so easy.net
這是個人jar包引用日誌
<log4j.version>1.2.17</log4j.version> <slf4j-log4j12.version>1.7.12</slf4j-log4j12.version> <!-- Log4j --> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>${log4j.version}</version> </dependency> <!-- 解決SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>${slf4j-log4j12.version}</version> </dependency>
轉載請指明出處:http://my.oschina.net/u/1991646/blog/680315code