You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2014/03/01 01:42:23 UTC

[jira] [Resolved] (LOG4J2-544) Change root logger level and spread to every logger with the same logconfig at runtime

     [ https://issues.apache.org/jira/browse/LOG4J2-544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralph Goers resolved LOG4J2-544.
--------------------------------

    Resolution: Not A Problem

Markig the issue as resolved. Please close if this answers your question, otherwise please reopen with more information.

> 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.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org