APIdia Launch Partner
Top Description Fields Constructors Methods
java.util.logging

pack-priv final Class Logging

extends Object
implements LoggingMXBean
Class Inheritance
All Implemented Interfaces
java.util.logging.LoggingMXBean
Annotations
@SuppressWarnings:deprecation
Imports
java.util.Enumeration, .List, .ArrayList

References Deprecated

LoggingMXBean is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Logging is the implementation class of LoggingMXBean. The LoggingMXBean interface provides a standard method for management access to the individual Logger objects available at runtime.
Authors
Ron Mann, Mandy Chung
Since
1.5
See Also
javax.management, Logger, LogManager

Field Summary

Modifier and TypeField and Description
private static String
private static final Logging
INSTANCE

References Deprecated Logging is deprecated or references (maybe indirectly) at least one deprecated element.
private static LogManager

Constructor Summary

AccessConstructor and Description
private
Logging()

Constructor of Logging which is the implementation class of LoggingMXBean.

Method Summary

Modifier and TypeMethod and Description
pack-priv static Logging
getInstance()
References Deprecated Logging is deprecated or references (maybe indirectly) at least one deprecated element.

public String
getLoggerLevel(String loggerName)

Implements java.util.logging.LoggingMXBean.getLoggerLevel.

Gets the name of the log level associated with the specified logger.

public List<String>
getLoggerNames()

Implements java.util.logging.LoggingMXBean.getLoggerNames.

Returns the list of currently registered logger names.

public String
getParentLoggerName(String loggerName)

Implements java.util.logging.LoggingMXBean.getParentLoggerName.

Returns the name of the parent for the specified logger.

public void
setLoggerLevel(String loggerName, String levelName)

Implements java.util.logging.LoggingMXBean.setLoggerLevel.

Sets the specified logger to the specified new level.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_STRINGback to summary
private static String EMPTY_STRING
INSTANCEback to summary
private static final Logging INSTANCE

References Deprecated

Logging is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

logManagerback to summary
private static LogManager logManager

Constructor Detail

Loggingback to summary
private Logging()

Constructor of Logging which is the implementation class of LoggingMXBean.

Method Detail

getInstanceback to summary
pack-priv static Logging getInstance()

References Deprecated

Logging is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

getLoggerLevelback to summary
public String getLoggerLevel(String loggerName)

Implements java.util.logging.LoggingMXBean.getLoggerLevel.

Doc from java.util.logging.LoggingMXBean.getLoggerLevel.

Gets the name of the log level associated with the specified logger. If the specified logger does not exist, null is returned. This method first finds the logger of the given name and then returns the name of the log level by calling:

Logger.getLevel().getName();

If the Level of the specified logger is null, which means that this logger's effective level is inherited from its parent, an empty string will be returned.

Annotations
@Override
getLoggerNamesback to summary
public List<String> getLoggerNames()

Implements java.util.logging.LoggingMXBean.getLoggerNames.

Doc from java.util.logging.LoggingMXBean.getLoggerNames.

Returns the list of currently registered logger names. This method calls LogManager#getLoggerNames and returns a list of the logger names.

Annotations
@Override
getParentLoggerNameback to summary
public String getParentLoggerName(String loggerName)

Implements java.util.logging.LoggingMXBean.getParentLoggerName.

Doc from java.util.logging.LoggingMXBean.getParentLoggerName.

Returns the name of the parent for the specified logger. If the specified logger does not exist, null is returned. If the specified logger is the root Logger in the namespace, the result will be an empty string.

Annotations
@Override
setLoggerLevelback to summary
public void setLoggerLevel(String loggerName, String levelName)

Implements java.util.logging.LoggingMXBean.setLoggerLevel.

Doc from java.util.logging.LoggingMXBean.setLoggerLevel.

Sets the specified logger to the specified new level. If the levelName is not null, the level of the specified logger is set to the parsed Level matching the levelName. If the levelName is null, the level of the specified logger is set to null and the effective level of the logger is inherited from its nearest ancestor with a specific (non-null) level value.

Annotations
@Override