log4j.properties 以前配置一直是默认在/web-inf/下面的,现在配额日志文件比较多,想从新规划下位置
在web.xml 下面配这些参数,路径自己定义就行了,我用的是log4j-1.2.15.jar
<!-- 以下3项参数与log4j的配置相关 -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:com/home/config/log4j.properties</param-value>
</context-param>
<context-param>
<param-name>log4jRefreshInterval</param-name>
<param-value>60000</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.util.Log4jConfigListener
</listener-class>
</listener>