jmx在log4j 中的应用

JMX : java  management  extension  是JDK提供的对应用程序提供管理监控功能的框架。

log4j 2.x 提供了对jmx的支持,默认对StatusLogger, ContextSelector, 和所有的 LoggerContexts, LoggerConfigs 以及 Appenders使用了MBeans , 并且可以被远程检测和控制.

Log4j JMX GUI

JMX GUI provides a Swing-based client for remotely editing the log4j configuration and remotely monitoring StatusLogger output.

The JMX GUI can be run as a stand-alone application or as a JConsole plug-in.

Requirements

The JMX GUI is dependent on Log4j 2 Core.

Usage

See the JMX manual page for details.

http://logging.apache.org/log4j/2.x/log4j-jmx-gui/

http://logging.apache.org/log4j/2.x/manual/jmx.html#ClientGUI

通过使用log4j 中的JMX, 可以方便远程查看日志 和 动态的修改log4j的配置文件。

 

你可能感兴趣的:(log4j,jmx)