Greg Mattes
Greg Mattes

Reputation: 33949

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?

Does it do this under some circumstances and not others?

Upvotes: 1

Views: 305

Answers (1)

Gursel Koca
Gursel Koca

Reputation: 21300

DOMConfigurator.configureAndWatch(log4jConfigurationFilePath, delayInmilisecond)

You can use above method to reflect changes at log4j config file , if you prefer xml .. If you prefer propery file , you can use PropertConfigurator.configureAndWatch method.

Upvotes: 3

Related Questions