1 *java.util.logging.LoggingMXBean* *LoggingMXBean* The management interface for t
3 public interface interface LoggingMXBean
6 |java.util.logging.LoggingMXBean_Description|
7 |java.util.logging.LoggingMXBean_Fields|
8 |java.util.logging.LoggingMXBean_Constructors|
9 |java.util.logging.LoggingMXBean_Methods|
11 ================================================================================
13 *java.util.logging.LoggingMXBean_Methods*
14 |java.util.logging.LoggingMXBean.getLoggerLevel(String)|Gets the name of the lo
15 |java.util.logging.LoggingMXBean.getLoggerNames()|Returns the list of currently
16 |java.util.logging.LoggingMXBean.getParentLoggerName(String)|Returns the name o
17 |java.util.logging.LoggingMXBean.setLoggerLevel(String,String)|Sets the specifi
19 *java.util.logging.LoggingMXBean_Description*
21 The management interface for the logging facility.
23 There is a single global instance of the LoggingMXBean. This instance is an
24 MXBean can be obtained by calling the (|java.util.logging.LogManager|) method
26 <tt>MBeanServer</tt>(|java.lang.management.ManagementFactory|) method.
28 The ObjectName(|javax.management.ObjectName|) for uniquely identifying the
29 LoggingMXBean within an MBeanServer is:
30 <tt>java.util.logging:type=Logging</tt>(|java.util.logging.LogManager|)
34 *java.util.logging.LoggingMXBean.getLoggerLevel(String)*
36 public |java.lang.String| getLoggerLevel(java.lang.String loggerName)
38 Gets the name of the log level associated with the specified logger. If the
39 specified logger does not exist, null is returned. This method first finds the
40 logger of the given name and then returns the name of the log level by calling:
41 Logger.getLevel()(|java.util.logging.Logger|) .
42 getName()(|java.util.logging.Level|) ;
46 If the Level of the specified logger is null, which means that this logger's
47 effective level is inherited from its parent, an empty string will be returned.
50 loggerName - The name of the Logger to be retrieved.
52 Returns: The name of the log level of the specified logger; or an empty string if the
53 log level of the specified logger is null. If the specified logger
54 does not exist, null is returned.
56 *java.util.logging.LoggingMXBean.getLoggerNames()*
58 public |java.util.List|<String> getLoggerNames()
60 Returns the list of currently registered loggers. This method calls
61 (|java.util.logging.LogManager|) and returns a list of the logger names.
65 Returns: A list of String each of which is a currently registered Logger name.
67 *java.util.logging.LoggingMXBean.getParentLoggerName(String)*
69 public |java.lang.String| getParentLoggerName(java.lang.String loggerName)
71 Returns the name of the parent for the specified logger. If the specified
72 logger does not exist, null is returned. If the specified logger is the root
73 Logger in the namespace, the result will be an empty string.
76 loggerName - The name of a Logger.
78 Returns: the name of the nearest existing parent logger; an empty string if the
79 specified logger is the root logger. If the specified logger does
80 not exist, null is returned.
82 *java.util.logging.LoggingMXBean.setLoggerLevel(String,String)*
84 public void setLoggerLevel(
85 java.lang.String loggerName,
86 java.lang.String levelName)
88 Sets the specified logger to the specified new level. If the levelName is not
89 null, the level of the specified logger is set to the parsed Level matching the
90 levelName. If the levelName is null, the level of the specified logger is set
91 to null and the effective level of the logger is inherited from its nearest
92 ancestor with a specific (non-null) level value.
95 loggerName - The name of the Logger to be set. Must be non-null.
96 levelName - The name of the level to set the specified logger to, or null if to set the
97 level to inherit from its nearest ancestor.