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 LogManager.getLoggingMXBean().

Since:
1.5

Method Summary
 String getLoggerLevel(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.
 String getParentLoggerName(String logger)
          Return the name of the parent of the indicated logger.
 void setLoggerLevel(String logger, String level)
          Sets the logging level for a particular logger.
 

Method Detail

getLoggerLevel

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

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


getParentLoggerName

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

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 Logger.setLevel(Level)