`

spring日志

 
阅读更多

<!-- 配置日志 -->

<context-param>

<param-name>log4jConfigLocation</param-name>

<param-value>/WEB-INF/classes/log4j.properties</param-value>

</context-param>

<listener>

<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>

</listener>

这里的上下文参数名称是固定的,Log4jConfigListener会读取这个名称对应的值。这个类是依赖Apachelog4j的。Log4jConfigListener实现了ServletContextListener所以服务器开启时会配置日志文件。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics