public interface StatusLoggerAdminMBean
StatusLogger
.Modifier and Type | Field and Description |
---|---|
static String |
NAME
Object name ("org.apache.logging.log4j2:type=StatusLogger") of this MBean.
|
static String |
NOTIF_TYPE_DATA
Notifications with this type have a
StatusData userData object
and a null message. |
static String |
NOTIF_TYPE_MESSAGE
Notifications with this type have a formatted status data message string
but no
StatusData in their userData field. |
Modifier and Type | Method and Description |
---|---|
String |
getLevel()
Returns the
StatusLogger level as a String. |
List<StatusData> |
getStatusData()
Returns a list with the most recent
StatusData objects in the
status history. |
String[] |
getStatusDataHistory()
Returns a string array with the most recent messages in the status
history.
|
void |
setLevel(String level)
Sets the
StatusLogger level to the specified value. |
static final String NAME
static final String NOTIF_TYPE_DATA
StatusData
userData object
and a null
message.static final String NOTIF_TYPE_MESSAGE
StatusData
in their userData field.List<StatusData> getStatusData()
StatusData
objects in the
status history. The list has up to 200 entries by default but the length
can be configured with system property "log4j2.status.entries"
.
Note that the returned objects may contain Throwable
s from
external libraries.
JMX clients calling this method must be prepared to deal with the errors
that occur if they do not have the class definition for such
Throwable
s in their classpath.
StatusLogger
.String[] getStatusDataHistory()
"log4j2.status.entries"
.StatusLogger
.String getLevel()
StatusLogger
level as a String.StatusLogger
level.void setLevel(String level)
StatusLogger
level to the specified value.level
- the new StatusLogger
level.IllegalArgumentException
- if the specified level is not one of
"OFF", "FATAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE",
"ALL"Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.