public interface LoggingMXBean
LoggingMXBean is the management interface for the logging sub-system.
The ObjectName for identifying the LoggingMXBean in a bean server is
LogManager.LOGGING_MXBEAN_NAME.
| Modifier and Type | Method and Description |
|---|---|
String |
getLoggerLevel(String loggerName)
Gets the string value of the logging level of a logger.
|
List<String> |
getLoggerNames()
Gets a list of all currently registered logger names.
|
String |
getParentLoggerName(String loggerName)
Gets the name of the parent logger of a logger.
|
void |
setLoggerLevel(String loggerName,
String levelName)
Sets the log level of a logger.
|
String getLoggerLevel(String loggerName)
null is returned if the specified logger does not exist.loggerName - the name of the logger lookup.String if the logger is found, otherwise null.Level.getName()List<String> getLoggerNames()
LogManager.getLoggerNames().String getParentLoggerName(String loggerName)
null is returned. If the logger is the root logger,
then an empty String is returned.loggerName - the name of the logger to lookup.String if the logger was found, otherwise null.void setLoggerLevel(String loggerName, String levelName)
null means the
level is inherited from the nearest non-null ancestor.loggerName - the name of the logger to set the level on, which must not be
null.levelName - the level to set on the logger, which may be null.IllegalArgumentException - if loggerName is not a registered logger or if
levelName is not null and not valid.Level.parse(String)