public class Log4jConfiguratorMBean extends Object implements CloneableDynamicMBean
Log4jConfigurator| Modifier and Type | Field and Description |
|---|---|
static String |
ASTERISK
Asterisk used as trailing string for inherited logging levels.
|
static String |
DEFAULT_JMX_NAME
Default name.
|
| Constructor and Description |
|---|
Log4jConfiguratorMBean()
Default constructor for Log4jConfiguratorMBean.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates a clone of the object.
|
Object |
getAttribute(String attribute)
Gets the value of an attribute and thus the level of a certain logger.
|
AttributeList |
getAttributes(String[] attributes)
Gets the values of several attributes.
|
MBeanInfo |
getMBeanInfo()
Returns all informations on the MBean, such as attributes and operations.
|
Object |
invoke(String actionName,
Object[] params,
String[] signature)
Invokes an operation on the MBean.
|
void |
setAttribute(Attribute attribute)
Sets the value of an attribute.
|
AttributeList |
setAttributes(AttributeList attributes)
Sets the values of several attributes.
|
String |
setLoggerLevel(String pattern,
String level)
Directly sets a level on one ore more loggers.
|
public static final String ASTERISK
public static final String DEFAULT_JMX_NAME
public Log4jConfiguratorMBean()
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute in interface DynamicMBeanAttributeNotFoundExceptionMBeanExceptionReflectionExceptionDynamicMBean.getAttribute(String)public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute in interface DynamicMBeanAttributeNotFoundExceptionInvalidAttributeValueExceptionMBeanExceptionReflectionExceptionDynamicMBean.setAttribute(Attribute)public AttributeList getAttributes(String[] attributes)
getAttribute.getAttributes in interface DynamicMBeangetAttribute(String),
DynamicMBean.getAttributes(String[])public AttributeList setAttributes(AttributeList attributes)
setAttribute.setAttributes in interface DynamicMBeansetAttribute(Attribute),
DynamicMBean.setAttributes(AttributeList)public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke in interface DynamicMBeanMBeanExceptionReflectionExceptionDynamicMBean.invoke(String, Object[], String[])public MBeanInfo getMBeanInfo()
getMBeanInfo in interface DynamicMBeangetAttributeInfo(),
getConstructorInfo(),
getOperationInfo(),
getNotificationInfo(),
DynamicMBean.getMBeanInfo()public String setLoggerLevel(String pattern, String level)
invoke method of this class and has to be public (since it is
called via reflection API).pattern - Regular expression used to select the loggers.level - New level.Level,
invoke(String, Object[], String[]),
getOperationInfo()public Object clone() throws CloneNotSupportedException
clone in interface CloneableDynamicMBeanclone in class ObjectCloneNotSupportedExceptionCopyright © 2016–2021. All rights reserved.