public class LoggingMXBeanImpl extends DynamicMXBeanImpl implements java.util.logging.LoggingMXBean
LoggingMXBean.info| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getLoggerLevel(java.lang.String loggerName)
Returns the string name of the specified
Loggerinstance's
current log level. |
java.util.List<java.lang.String> |
getLoggerNames()
Returns a list of the names of all of the currently registered
Logger instances. |
java.lang.String |
getParentLoggerName(java.lang.String loggerName)
Returns the name of the parent
Loggerof the specified registered
Logger,loggerName. |
void |
setLoggerLevel(java.lang.String loggerName,
java.lang.String levelName)
Attempts to update the log level of the
Logger with name
loggerName to levelName. |
getAttribute, getAttributes, getMBeanInfo, getPresentAttribute, getPresentOperation, initMBeanInfo, invoke, setAttribute, setAttributes, setMBeanInfopublic java.lang.String getLoggerLevel(java.lang.String loggerName)
java.util.logging.LoggingMXBeanLoggerinstance's
current log level.getLoggerLevel in interface java.util.logging.LoggingMXBeanloggerName - the name of a particular Logger instanceloggerName 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.public java.util.List<java.lang.String> getLoggerNames()
java.util.logging.LoggingMXBeanLogger instances.getLoggerNames in interface java.util.logging.LoggingMXBeanLogger objects.public java.lang.String getParentLoggerName(java.lang.String loggerName)
java.util.logging.LoggingMXBeanLoggerof the specified registered
Logger,loggerName.getParentLoggerName in interface java.util.logging.LoggingMXBeanloggerName - the name of a particular Logger instanceloggerName 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.public void setLoggerLevel(java.lang.String loggerName,
java.lang.String levelName)
java.util.logging.LoggingMXBeanLogger 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.
setLoggerLevel in interface java.util.logging.LoggingMXBeanloggerName - the name of a registered LoggerlevelName - 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.