public interface PlatformLoggingMXBean extends PlatformManagedObject
Precisely one instance of this interface will be made available to management clients.
Accessing this MXBean
can be done in one of three ways.
ManagementFactory.getPlatformMXBean(java.lang.Class<T>)
method.
ManagementFactory.newPlatformMXBeanProxy(javax.management.MBeanServerConnection, java.lang.String, java.lang.Class<T>)
method, passing in
"java.util.logging:type=Logging" for the value of the second parameter.
Modifier and Type | Method and Description |
---|---|
String |
getLoggerLevel(String loggerName)
Returns the string name of the specified
Logger
instance's current log level. |
List<String> |
getLoggerNames()
Returns a list of the names of all of the currently registered
Logger instances. |
String |
getParentLoggerName(String loggerName)
|
void |
setLoggerLevel(String loggerName,
String levelName)
|
getObjectName
String getLoggerLevel(String loggerName)
Logger
instance's current log level.loggerName
- the name of a particular Logger
instanceloggerName
resolves to an existing registered
Logger
instance, the log level of that instance.
Note that if it is the case that the Logger
just
inherits its log level rather than specifying its own, then an
empty string (""
) will be returned. If
loggerName
does not resolve to a registered
instance of Logger
then a null
value is returned.List<String> getLoggerNames()
Logger
instances.Logger
objects.String getParentLoggerName(String loggerName)
loggerName
- the name of a particular Logger
instanceloggerName
resolves to an existing registered
Logger
instance, the name of its parent
Logger
. If the Logger
is the root
entry in the Logger
hierarchy, then an empty
string (""
) will be returned. If
loggerName
does not resolve to a registered
instance of Logger
then a null
value is returned.void setLoggerLevel(String loggerName, String levelName)
Logger
with name loggerName
to levelName
.
If levelName
is null
then the Logger
instance's log level is set to be null
with the result that
it will inherit its log level from its nearest parent which does not have
a null
log level value.
loggerName
- the name of a registered Logger
levelName
- the name of the new log level. May be null
,
in which case loggerName
will inherit the log level of its
closest parent with a non-null
log level.IllegalArgumentException
- if there is no Logger
with the name loggerName
. Also may be thrown if
loggerName
is not a known log level name.SecurityException
- if there is a security manager active and
the caller does not have
LoggingPermission
of "control".Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 1993, 2025 IBM Corp. and others.