[ https://issues.apache.org/jira/browse/LOG4J2-544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13918919#comment-13918919 ]
Hongdi Ren commented on LOG4J2-544: ----------------------------------- Hi Ralph, Got it. Thanks very much. > Change root logger level and spread to every logger with the same logconfig > at runtime > -------------------------------------------------------------------------------------- > > Key: LOG4J2-544 > URL: https://issues.apache.org/jira/browse/LOG4J2-544 > Project: Log4j 2 > Issue Type: Question > Components: API, Core > Affects Versions: 2.0-rc1 > Environment: win 7 64x > java 1.7 > Reporter: Hongdi Ren > > Hi everyone, > There's a need to increase the log level for EVERY logger at runtime and > after certain processing, bring it back to the original level. > I've tried to set the level of ROOT logger use log4j.core.Logger.setLevel, > but the level only works on the root logger. I've done some investigation and > find setLevel doesn't change the LoggerConfig object, just change the level > related to current logger, so loggers share the same LoggerConfig won't > change the logger level. > Is there any way to meet my requirement? I think this is a common one when we > have batch work in the application. > Thanks in advance! -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org