logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pranav Pratap (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (LOG4J2-823) Changing AsyncLogger level programmatically
Date Fri, 12 Sep 2014 21:25:34 GMT

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

Pranav Pratap reopened LOG4J2-823:
----------------------------------

Synchronous logger change programmatically works but not Asynchronous Logger.

> Changing AsyncLogger level programmatically
> -------------------------------------------
>
>                 Key: LOG4J2-823
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-823
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.0-rc2
>            Reporter: Pranav Pratap
>              Labels: AsyncLogger
>
> I am trying to programmatically change the log level of AsyncLogger. But unable to do
so. 
> Programmatically we can change AsyncRoot or Root Log level using below code:
> LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
> 		Configuration config = ctx.getConfiguration();
> 		LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
> 		loggerConfig.setLevel(level);
> 		ctx.updateLoggers();
> How to achieve the same for AsyncLogger? Please suggest. I searched many forums but all
provide the way for Root Level or AsyncRoot Log Level Change. But no once suggest the AsyncLogger
logger level change mechanism.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message