com.ibm.lang.management

Class LoggingMXBeanImpl

  1. java.lang.Object
  2. extended bycom.ibm.lang.management.DynamicMXBeanImpl
  3. extended bycom.ibm.lang.management.LoggingMXBeanImpl
All implemented interfaces:
java.util.logging.LoggingMXBean, javax.management.DynamicMBean

  1. public class LoggingMXBeanImpl
  2. extends DynamicMXBeanImpl
  3. implements java.util.logging.LoggingMXBean
Runtime type for LoggingMXBean.
Since:
1.5

Field Summary

Fields inherited from class com.ibm.lang.management.DynamicMXBeanImpl
info

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
getLoggerLevel(java.lang.String loggerName)
  1. java.util.List<java.lang.String>
getLoggerNames()
  1. java.lang.String
getParentLoggerName(java.lang.String loggerName)
  1. void
setLoggerLevel(java.lang.String loggerName,java.lang.String levelName)
Methods inherited from class com.ibm.lang.management.DynamicMXBeanImpl
getAttribute, getAttributes, getMBeanInfo, getPresentAttribute, getPresentOperation, initMBeanInfo, invoke, setAttribute, setAttributes, setMBeanInfo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getLoggerLevel

  1. public java.lang.String getLoggerLevel( java.lang.String loggerName)

Description copied from interface: java.util.logging.LoggingMXBean

Returns the string name of the specified Loggerinstance's current log level.
Specified by:
getLoggerLevel in interface java.util.logging.LoggingMXBean
Parameters:
loggerName - the name of a particular Logger instance
Returns:
if loggerName resolves to an existing registered Logger instance, the log level of that instance. Note that if it is the case that the Logger just inherits its log level rather than specifying its own, then an empty string ("") will be returned. If loggerName does not resolve to a registered instance of Logger then a null value is returned.

getLoggerNames

  1. public java.util.List<java.lang.String> getLoggerNames( )

Description copied from interface: java.util.logging.LoggingMXBean

Returns a list of the names of all of the currently registered Logger instances.
Specified by:
getLoggerNames in interface java.util.logging.LoggingMXBean
Returns:
a list of the names of all registered Logger objects.

getParentLoggerName

  1. public java.lang.String getParentLoggerName( java.lang.String loggerName)

Description copied from interface: java.util.logging.LoggingMXBean

Returns the name of the parent Loggerof the specified registered Logger,loggerName.
Specified by:
getParentLoggerName in interface java.util.logging.LoggingMXBean
Parameters:
loggerName - the name of a particular Logger instance
Returns:
if loggerName resolves to an existing registered Logger instance, the name of its parent Logger. If the Logger is the root entry in the Logger hierarchy, then an empty string ("") will be returned. If loggerName does not resolve to a registered instance of Logger then a null value is returned.

setLoggerLevel

  1. public void setLoggerLevel(java.lang.String loggerName,
  2. java.lang.String levelName)

Description copied from interface: java.util.logging.LoggingMXBean

Attempts to update the log level of the Logger with name loggerName to levelName.

If levelName is null then the Logger instance's log level is set to be null with the result that it will inherit its log level from its nearest parent which does not have a null log level value.

Specified by:
setLoggerLevel in interface java.util.logging.LoggingMXBean
Parameters:
loggerName - the name of a registered Logger
levelName - the name of the new log level. May be null, in which case loggerName will inherit the log level of its closest parent with a non-null log level.