Mine is a spring boot application and I am using log4j2 for logging. log4j-spring.xml is the config file.
I need to change log level for an appender programatically. Am able to do it in code using Configurator.setLevel(). The question is how to persist the change in log4j-spring.xml itself? Do I have to parse XML file to make this change or is there a better way?