Font size:
Manage Log4J loggers via JMX
HiveMind JMX includes support for the management of Log4J. HiveMind uses the basic MBeans already provided by Log4J and adds configurable and dynamic registration of new loggers for management. The MBeans can be used to change log levels, add new appenders and set log thresholds.
Add these lines to your descriptor to activate the Log4j management and create MBeans for all loggers named "hivemind.*" (* is a wildcard ).
<contribution configuration-id="hivemind.management.MBeans"> <mbean service-id="hivemind.management.log4j.LogManagementMBean" /> </contribution> <contribution configuration-id="hivemind.management.log4j.ManagedLog4jLoggers"> <logger name="hivemind.*" /> </contribution>
Note
At startup HiveMind searches for known loggers that match the
configured name patterns. It's quite likeley, that some
of the loggers that should be managed doesn't exist in this
early phase, since usually loggers are create when a class gets loaded.
If loggers are missing try to add them using the addLoggerMBean
method of the LogManagementMBean on runtime.