`

Log4j 实时加载方式

 
阅读更多

PropertyConfigurator.configureAndWatch("/WEB-INF/log4j.properties", 1000);


log4j自带有FileWatchdog功能:
 
 
  PropertyConfigurator.configureAndWatch("c://log4j.properties",60000);//每分钟检测一次文件是否被更改,如果更改,则自动重新读取配置。
 
  DOMConfigurator.configureAndWatch("c://log4j.properties",60000);//xml配置格式的。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics