My favorites | Sign in
Logo
                
Activity: Low
Code license:
Apache License 2.0
Labels:
log4j, jmx, reload, log4j.properties, log, level
Feeds:
Project feeds

Short description

JMX bean which provides the functionality to change the log level of a class/package and to reload the log4j.properties during runtime.

Introduction

I was facing the problem to change log4j.properties settings of classes/categories during runtime of an application. Additionally i wanted to have also the possibility to reset/reload the settings again like they was before. After studying log4j documentation i couldn't find only a half solution materialized as an jmx bean (http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/jmx/package-summary.html). After deeper google search for this issue, i found several hints how to solve this issue, which i would like to combine here.

Details

Requirements

Functionality

All functionalities are grouped in the interface http://code.google.com/p/logging-jmx-service/source/browse/trunk/logjmxservice/src/main/java/de/stefanheintz/log/jmxservice/LoggingConfig.java of the JMX MBean http://code.google.com/p/logging-jmx-service/source/browse/trunk/logjmxservice/src/main/java/de/stefanheintz/log/jmxservice/LoggingConfigImpl.java:

More details are available at the Tutorial page.

Version history

Version Date Descritpion
1.1.12009-05-10Small NPE bug fixing for changing log level of a class having no log level yet
1.1.02009-02-10Sending notifications whenever a log level change or reloading was triggered
1.0.02009-01-04First implementation including setting of log levels and reloading of the log4j.properties

References









Powered by Google Project Hosting