首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Log4j实时见效方式

2012-09-20 
Log4j实时生效方式PropertyConfigurator.configureAndWatch(/WEB-INF/log4j.properties, 1000) log4j自

Log4j实时生效方式
PropertyConfigurator.configureAndWatch("/WEB-INF/log4j.properties", 1000);


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

热点排行