In log4j
, there is a feature configureAndWatch
(as mentioned below) where without application server restart, log threshold level can be modified with default delay.
org.apache.log4j.xml.DOMConfigurator.configureAndWatch(log4j.xml path);
Is this possible in log4j2
as well ? If yes, then how can this be achieved ?
Also, below are lines of code for setting up and cleaning up log4j
setup.
BasicConfigurator.configure()
BasicConfigurator.resetConfiguration()
How can this be achieved in log4j2
? Please help. Thanks.
Per Log4j2 documentation https://logging.apache.org/log4j/2.x/manual/configuration.html