Build 1.0_r1(from source)

java.util.logging
Interface LoggingMXBean


public interface LoggingMXBean

The management interface for the logging sub-system.

ObjectName = java.util.logging:type=Logging

Since:
1.5

Method Summary
 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's 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.
 

Method Detail

getLoggerLevel

String getLoggerLevel(String loggerName)

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.

Parameters:
loggerName - The name of the logger lookup.
Returns:
A String if the logger was found, otherwise null.
See Also:
Level.getName()

getLoggerNames

List<String> getLoggerNames()

Gets a list of all currently registered logger's names. This is performed using the LogManager.getLoggerNames().

Returns:
A List of String instances.

getParentLoggerName

String getParentLoggerName(String loggerName)

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.

Parameters:
loggerName - The name of the logger to lookup.
Returns:
A String if the logger was found, otherwise null.

setLoggerLevel

void setLoggerLevel(String loggerName,
                    String levelName)

Sets the log level of a logger.

Parameters:
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.
Throws:
IllegalArgumentException - if loggerName is not a registered logger or if levelName is not null and an invalid value.
SecurityException - if a security manager exists and the caller doesn't have LoggingPermission("control").
See Also:
Level.parse(String)

Build 1.0_r1(from source)

Please submit a feedback, bug or feature