You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "satish (Jira)" <ji...@apache.org> on 2020/06/23 15:54:00 UTC

[jira] [Created] (LOG4J2-2878) How to change the level of the appender

satish created LOG4J2-2878:
------------------------------

             Summary: How to change the level of the appender 
                 Key: LOG4J2-2878
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2878
             Project: Log4j 2
          Issue Type: Question
          Components: Appenders
    Affects Versions: 2.13.3
            Reporter: satish


I am trying to change the Level programmatically .

I am able to change the logger level using the loggerConfig, but I could not find a way to change the appender level.
 # Is there any code example that demonstrate how to change the appender level like we have  :[http://logging.apache.org/log4j/2.x/manual/customconfig.html#Hybrid] for logger level change, as I see the level in appender is final.
 # To change appender level should we change the appender or appenderRef? if I change appenderRef of a logger then any other logger using the same appender will get same level. (I mean appender is a singleton)

Thanks for your help in advance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)