简体   繁体   English

反映配置文件更改的Log4j?

[英]Log4j reflecting configuration file changes?

If I make a change to a Log4j configuration file, do I have to restart my application for the changes to take affect, or does Log4j notice the changes and reconfigure itself? 如果对Log4j配置文件进行了更改,是否必须重新启动应用程序以使更改生效,或者Log4j是否注意到更改并重新配置了自身?

Does it do this under some circumstances and not others? 它是否在某些情况下而不是其他情况下这样做?

DOMConfigurator.configureAndWatch(log4jConfigurationFilePath, delayInmilisecond)

如果您喜欢xml。,则可以使用上述方法反映log4j配置文件中的更改。如果您喜欢属性文件,则可以使用PropertConfigurator.configureAndWatch方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM