在web项目中配置log4j

在web.xml中添加如下代码

1 <context-param>
2     <param-name>contextConfigLocation</param-name>
3     <param-value>classpath*:*.xml</param-value>
4 </context-param>
5  
6 <listener>
7     <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
8 </listener>

 

posted on 2015-02-27 09:53  modprobe  阅读(276)  评论(0编辑  收藏  举报