首页 > 代码库 > spring 集成 log4j 配置

spring 集成 log4j 配置

在web.xml中增加如下代码:

<context-param>      <param-name>log4jConfigLocation</param-name>      <param-value>/WEB-INF/classes/log4j.properties</param-value>   </context-param>   <context-param>        <param-name>webAppRootKey</param-name>          <param-value>myappfuse.root</param-value>      </context-param>    <context-param>      <param-name>log4jRefreshInterval</param-name>      <param-value>6000</param-value>   </context-param>    <listener>      <listener-class>        org.springframework.web.util.Log4jConfigListener      </listener-class>   </listener>

 

spring 集成 log4j 配置