log4j及时生效


log4j自带有FileWatchdog功能:

PropertyConfigurator.configureAndWatch("log4j.properties",60000);
//每分钟检测一次文件是否被更改,如果更改,则自动重新读取配置。

DOMConfigurator.configureAndWatch("log4j.properties",60000);
//xml配置格式的。

你可能感兴趣的:(log4j及时生效)