使用log4j.properties配置slf4j输出LOG

完成配置需要以下文件:

  1. slf4j-log4j12-xxx.jar
  2. slf4j-api-xxx,jar
  3. log4j-xxx.jar
  4. log4j.propertes

如果使用maven则直接引用下面的依赖就行了,另外两个jar会级联依赖进来。

 

<dependency>
	<groupId>org.slf4j</groupId>
	<artifactId>slf4j-log4j12</artifactId>
	<version>1.7.5</version>
</dependency>

 

参考:

http://imshare.iteye.com/blog/772770

http://unmi.cc/slf4j-log4j/

 

--end

 

你可能感兴趣的:(使用log4j.properties配置slf4j输出LOG)