org.apache.logging.log4j.core.jmx
Class LoggerConfigAdmin

java.lang.Object
  extended by org.apache.logging.log4j.core.jmx.LoggerConfigAdmin
All Implemented Interfaces:
LoggerConfigAdminMBean

public class LoggerConfigAdmin
extends Object
implements LoggerConfigAdminMBean

Implementation of the LoggerConfigAdminMBean interface.


Field Summary
 
Fields inherited from interface org.apache.logging.log4j.core.jmx.LoggerConfigAdminMBean
PATTERN
 
Constructor Summary
LoggerConfigAdmin(LoggerContext loggerContext, LoggerConfig loggerConfig)
          Constructs a new LoggerConfigAdmin with the specified contextName and logger config.
 
Method Summary
 String[] getAppenderRefs()
          Returns a String array with the appender refs configured for the instrumented LoggerConfig.
 String getFilter()
          Returns a string description of all filters configured for the instrumented LoggerConfig.
 String getLevel()
          Returns the LoggerConfig level as a String.
 String getName()
          Returns the name of the instrumented LoggerConfig.
 ObjectName getObjectName()
          Returns the ObjectName of this mbean.
 boolean isAdditive()
          Returns whether the instrumented LoggerConfig is additive.
 boolean isIncludeLocation()
          Returns whether the instrumented LoggerConfig is configured to include location.
 void setAdditive(boolean additive)
          Sets whether the instrumented LoggerConfig should be additive.
 void setLevel(String level)
          Sets the LoggerConfig level to the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerConfigAdmin

public LoggerConfigAdmin(LoggerContext loggerContext,
                         LoggerConfig loggerConfig)
Constructs a new LoggerConfigAdmin with the specified contextName and logger config.

Parameters:
contextName - used in the ObjectName for this mbean
loggerConfig - the instrumented object
Method Detail

getObjectName

public ObjectName getObjectName()
Returns the ObjectName of this mbean.

Returns:
the ObjectName
See Also:
LoggerConfigAdminMBean.PATTERN

getName

public String getName()
Description copied from interface: LoggerConfigAdminMBean
Returns the name of the instrumented LoggerConfig.

Specified by:
getName in interface LoggerConfigAdminMBean
Returns:
the name of the LoggerConfig

getLevel

public String getLevel()
Description copied from interface: LoggerConfigAdminMBean
Returns the LoggerConfig level as a String.

Specified by:
getLevel in interface LoggerConfigAdminMBean
Returns:
the LoggerConfig level.

setLevel

public void setLevel(String level)
Description copied from interface: LoggerConfigAdminMBean
Sets the LoggerConfig level to the specified value.

Specified by:
setLevel in interface LoggerConfigAdminMBean
Parameters:
level - the new LoggerConfig level.

isAdditive

public boolean isAdditive()
Description copied from interface: LoggerConfigAdminMBean
Returns whether the instrumented LoggerConfig is additive.

Specified by:
isAdditive in interface LoggerConfigAdminMBean
Returns:
true if the LoggerConfig is additive, false otherwise

setAdditive

public void setAdditive(boolean additive)
Description copied from interface: LoggerConfigAdminMBean
Sets whether the instrumented LoggerConfig should be additive.

Specified by:
setAdditive in interface LoggerConfigAdminMBean
Parameters:
additive - true if the instrumented LoggerConfig should be additive, false otherwise

isIncludeLocation

public boolean isIncludeLocation()
Description copied from interface: LoggerConfigAdminMBean
Returns whether the instrumented LoggerConfig is configured to include location.

Specified by:
isIncludeLocation in interface LoggerConfigAdminMBean
Returns:
whether location should be passed downstream

getFilter

public String getFilter()
Description copied from interface: LoggerConfigAdminMBean
Returns a string description of all filters configured for the instrumented LoggerConfig.

Specified by:
getFilter in interface LoggerConfigAdminMBean
Returns:
a string description of all configured filters for this LoggerConfig

getAppenderRefs

public String[] getAppenderRefs()
Description copied from interface: LoggerConfigAdminMBean
Returns a String array with the appender refs configured for the instrumented LoggerConfig.

Specified by:
getAppenderRefs in interface LoggerConfigAdminMBean
Returns:
the appender refs for the instrumented LoggerConfig.


Copyright © 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.