qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Gemmell (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Updated: (QPID-1648) Enable live reconfiguration of Log4J settings for the Java broker via JMX
Date Fri, 06 Feb 2009 22:43:02 GMT

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

Robert Gemmell updated QPID-1648:

    Attachment: log4j_config_changes.patch

I attach QPID-1648_6feb2009.patch - this should be applied after the patch for QPID-1511

The patch adds a new MBean to cater for logging management. It allows changing the levels
of any active log4j logger at runtime, and viewing the effective (taking the logger heirarchy
into consideration) logging levels of the active loggers. It also allows viewing and updating
of the existing level assigned to a logger within the log4j xml configuration file (it doesnt
add new loggers/level elements, just manipulates existing ones.) It has similar capabilities
for the RootLogger, although in this case the viewing of the level is done via an attribute.
Finally it has an attribute for the log4j logwatch period to allow viewing whether logwatch
is enabled or not. The MBeanInvocationHandler is updated to restrict access to the MBean to
'admin' level users. A test is included in the patch.

I also attach a second patch which need not be applied, but shows some changes versus the
current file which occur when the new configuration file is output. This happens because the
XML parser adds in any defaulted attributes present in the DTD. (It also insists on writing
the doctype line out on the same line as the end of the apache licence, I couldnt get it to
stop that)

> Enable live reconfiguration of Log4J settings for the Java broker via JMX
> -------------------------------------------------------------------------
>                 Key: QPID-1648
>                 URL: https://issues.apache.org/jira/browse/QPID-1648
>             Project: Qpid
>          Issue Type: New Feature
>          Components: Java Broker, Java Management : JMX Console
>            Reporter: Robert Gemmell
>             Fix For: Eclipse MC M5
>         Attachments: log4j_config_changes.patch, QPID-1648_6feb2009.patch
> It would be useful to be able to update the Log4J settings for a running Java broker
via JMX, incase it was desirable to adjust logging to investigate an issue which became apparent
after startup. 
> Whilst Log4J supports monitoring its own configuration file for updates, the broker must
be started with this enabled for it to be of any use, and updating the settings by manually
modifying the xml file runs the risk of accidentally rendering the file invalid, which could
lead to serious issues when the update is detected and applied by Log4j.
> In order to address these issues, adding the ability to to update the settings via JMX
would allow users to be able to adjust the Log4J settings in 2 ways: by modifying the xml
file programatically rather than by hand, or by modifying the Log4J runtime settings directly,
allowing (temporary) updates even where Log4J has not been instructed to monitor its configuration
file for change.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org

View raw message