java.util.logging.LoggingMXBean |
LoggingMXBean
is the management interface for the logging sub-system.
The ObjectName for identifying the LoggingMXBean
in a bean server is
LOGGING_MXBEAN_NAME
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the string value of the logging level of a logger.
| |||||||||||
Gets a list of all currently registered logger names.
| |||||||||||
Gets the name of the parent logger of a logger.
| |||||||||||
Sets the log level of a logger.
|
Gets the string value of the logging level of a logger. An empty string
is returned when the logger's level is defined by its parent. A
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
.Gets a list of all currently registered logger names. This is performed
using the getLoggerNames()
.
Gets the name of the parent logger of a logger. If the logger doesn't
exist then 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
.
Sets the log level of a logger. LevelName set to 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. |
---|---|
SecurityException | if a security manager exists and the caller doesn't have LoggingPermission("control"). |