web.xml log4j的配置
- <!-- log4j 配置 开始 -->
- <context-param>
- <param-name>log4jConfigLocation</param-name>
- <param-value>classpath:log4j.properties</param-value>
- </context-param>
- <context-param>
- <param-name>log4jRefreshInterval</param-name>
- <param-value>600000</param-value>
- </context-param>
- <context-param>
- <param-name>webAppRootKey</param-name>
- <param-value>fes.root</param-value>
- </context-param>
- <listener>
- <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
- </listener>
- <!-- log4j 配置 结束 -->
log4jConfigLocation配置文件存放的位置
log4jRefreshInterval为60000表示 开一条watchdog线程每60秒扫描一下配置文件的变化;这样便于日志存放位置的改变
- <context-param>
- <param-name>webAppRootKey</param-name>
- <param-value>fes.root</param-value>
- </context-param>