Programmatically change log level in Log4j2
问题 I\'m interested in programmatically changing the log level in Log4j2. I tried looking at their configuration documentation but that didn\'t seem to have anything. I also tried looking in the package: org.apache.logging.log4j.core.config , but nothing in there looked helpful either. 回答1: EDITED according to log4j2 version 2.4 FAQ You can set a logger’s level with the class Configurator from Log4j Core. BUT be aware that the Configurator class is not part of the public API. // org.apache