标签:log4jconfiglistener 监听log4j
在web.xml上添加如下配置即可动态监听log4j.properties的变化
<!-- 需要监听的log4j文件地址 -->! <context-param> <param-name>log4jConfigLocation</param-name> <param-value>classpath:log4j.properties</param-value> </context-param> <!-- 监听log4j.properties --> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener>
本文出自 “DeaconLi” 博客,请务必保留此出处http://lizhuquan0769.blog.51cto.com/2591147/1795877
【Spring】使用Log4jConfigListener动态监听log4j.properties
标签:log4jconfiglistener 监听log4j
原文地址:http://lizhuquan0769.blog.51cto.com/2591147/1795877