java.util.logging

Interface LoggingMXBean

public interface LoggingMXBean

This interface represents the management interface for logging. There is a single logging bean per VM instance, which can be retrieved via {@link LogManager#getLoggingMXBean()}.

Since: 1.5

Method Summary
StringgetLoggerLevel(String logger)
Return the name of the logging level given the name of a logger.
List<String>getLoggerNames()
Return a list of all logger names.
StringgetParentLoggerName(String logger)
Return the name of the parent of the indicated logger.
voidsetLoggerLevel(String logger, String level)
Sets the logging level for a particular logger.

Method Detail

getLoggerLevel

public String getLoggerLevel(String logger)
Return the name of the logging level given the name of a logger. Returns null if no such logger exists.

Parameters: logger the logger's name

Returns: the logging level's name, or null

getLoggerNames

public List<String> getLoggerNames()
Return a list of all logger names.

getParentLoggerName

public String getParentLoggerName(String logger)
Return the name of the parent of the indicated logger. If no such logger exists, returns null. If the logger is the root logger, returns the empty string.

Parameters: logger the logger's name

Returns: the name of the logger's parent, or null

setLoggerLevel

public void setLoggerLevel(String logger, String level)
Sets the logging level for a particular logger.

Parameters: logger the name of the logger level the name of the new logging level, or null

Throws: IllegalArgumentException if the level is not recognized, or if the logger does not exist SecurityException if access is denied; see {@link Logger#setLevel(Level)}