public final class Server extends Object
All instrumentation for Log4j 2 classes can be disabled by setting system
property -Dlog4j2.disable.jmx=true
.
Modifier and Type | Method and Description |
---|---|
static String |
escape(String name)
Either returns the specified name as is, or returns a quoted value
containing the specified name with the special characters (comma, equals,
colon, quote, asterisk, or question mark) preceded with a backslash.
|
static void |
registerMBeans(ContextSelector selector)
Creates MBeans to instrument the specified selector and other classes in
the log4j class hierarchy and registers the MBeans in the platform MBean
server so they can be accessed by remote clients.
|
static void |
registerMBeans(ContextSelector selector,
MBeanServer mbs)
Creates MBeans to instrument the specified selector and other classes in
the log4j class hierarchy and registers the MBeans in the specified MBean
server so they can be accessed by remote clients.
|
public static String escape(String name)
name
- the name to escape so it can be used as a value in an
ObjectName
.public static void registerMBeans(ContextSelector selector) throws JMException
selector
- starting point in the log4j class hierarchyJMException
- if a problem occurs during registrationpublic static void registerMBeans(ContextSelector selector, MBeanServer mbs) throws JMException
selector
- starting point in the log4j class hierarchymbs
- the MBean Server to register the instrumented objects inJMException
- if a problem occurs during registrationCopyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.