How to change root logging level programmatically for logback
Try this:
import org.slf4j.LoggerFactory;import ch.qos.logback.classic.Level;import ch.qos.logback.classic.Logger;Logger root = (Logger)LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);root.setLevel(Level.INFO);
Note that you can also tell logback to periodically scan your config file like this:
<configuration scan="true" scanPeriod="30 seconds" > ...</configuration>
I assume you are using logback (from the configuration file).
From logback manual, I see
Logger rootLogger = LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
Perhaps this can help you change the value?