logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (LOG4J2-637) Log4j2 JMX: Updating the logging level via jConsole doesn't take effect
Date Sat, 17 May 2014 03:37:15 GMT

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

Remko Popma reassigned LOG4J2-637:

    Assignee: Remko Popma

> Log4j2 JMX: Updating the logging level via jConsole doesn't take effect
> -----------------------------------------------------------------------
>                 Key: LOG4J2-637
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-637
>             Project: Log4j 2
>          Issue Type: Bug
>            Reporter: Mansoor Sajjad
>            Assignee: Remko Popma
>         Attachments: log4j2.xml
> I am trying to configure log4j2 so that
> 1. I can access the loggers via JMX and
> 2. Change their log levels.
> When I hook everything up, I am able to access the LoggerContext via JConsole, which
contains all of my LoggerConfigs.
> Each LoggerConfig show the correct log level with which the application is running. And
if I update a log level in any LoggerConfig it call the MBean and update the logging level
correctly, which I have inspected via debugging. But the problem is that updating the log
level doesn't take any effect. The application keeps on logging with the old logging level.
> For example If I start the application with the XYZ logger with log level DEBUG, and
change this log level to FATAL via JConsole, it changes successfully but application keep
on logging in DEBUG level.
> If instead of updating the single LoggerConfig if I update the LoggerContext by passing
the new xml configuration with updated logging levels it works as expected.
> What should be the problem? Documentation is quite and google refused to help me.
> My Findings:
> As far as I understood this problem is that when I update the Log level in the LoggerConfig
via JConsole, log4j2 update the log level via MBean correctly but its not updating the LoggerContext,
it simply call the setter method and returns. But in case if I update LoggerCoentext log4j2
create the new context to update itself.

This message was sent by Atlassian JIRA

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

View raw message