|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AsyncAppenderAdminMBean
The MBean interface for monitoring and managing an AsyncAppender
.
Field Summary | |
---|---|
static String |
PATTERN
ObjectName pattern ("org.apache.logging.log4j2:type=%s,component=AsyncAppenders,name=%s" ) for AsyncAppenderAdmin MBeans. |
Method Summary | |
---|---|
String[] |
getAppenderRefs()
Returns a String array with the appender refs configured for the instrumented AsyncAppender . |
String |
getErrorHandler()
Returns the result of calling toString on the error handler of
this appender, or "null" if no error handler was set. |
String |
getErrorRef()
Returns the name of the appender that any errors are logged to or null . |
String |
getFilter()
Returns a string description of all filters configured for the instrumented AsyncAppender . |
String |
getLayout()
Returns the result of calling toString on the Layout
object of the instrumented AsyncAppender . |
String |
getName()
Returns the name of the instrumented AsyncAppender . |
int |
getQueueCapacity()
|
int |
getQueueRemainingCapacity()
|
boolean |
isBlocking()
Returns true if this AsyncAppender will block when the queue is
full, or false if events are dropped when the queue is full. |
boolean |
isIgnoreExceptions()
Returns how exceptions thrown on the instrumented AsyncAppender
are handled. |
boolean |
isIncludeLocation()
Returns true if this AsyncAppender will take a snapshot of the
stack with every log event to determine the class and method where the
logging call was made. |
Field Detail |
---|
static final String PATTERN
You can find all registered AsyncAppenderAdmin MBeans like this:
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); String pattern = String.format(AsyncAppenderAdminMBean.PATTERN, "*", "*"); Set<ObjectName> appenderNames = mbs.queryNames(new ObjectName(pattern), null);
Some characters are not allowed in ObjectNames. The logger context name and appender name may be quoted. When AsyncAppenderAdmin MBeans are registered, their ObjectNames are created using this pattern as follows:
String ctxName = Server.escape(loggerContext.getName()); String appenderName = Server.escape(appender.getName()); String name = String.format(PATTERN, ctxName, appenderName); ObjectName objectName = new ObjectName(name);
Server.escape(String)
,
Constant Field ValuesMethod Detail |
---|
String getName()
AsyncAppender
.
String getLayout()
toString
on the Layout
object of the instrumented AsyncAppender
.
Layout
of the instrumented AsyncAppender
as a
stringboolean isIgnoreExceptions()
AsyncAppender
are handled.
true
if any exceptions thrown by the AsyncAppender will
be logged or false
if such exceptions are re-thrown.String getErrorHandler()
toString
on the error handler of
this appender, or "null"
if no error handler was set.
toString
on the error handler of this
appender, or "null"
String getFilter()
AsyncAppender
.
String[] getAppenderRefs()
AsyncAppender
.
AsyncAppender
.boolean isIncludeLocation()
true
if this AsyncAppender will take a snapshot of the
stack with every log event to determine the class and method where the
logging call was made.
true
if location is included with every event,
false
otherwiseboolean isBlocking()
true
if this AsyncAppender will block when the queue is
full, or false
if events are dropped when the queue is full.
String getErrorRef()
null
.
null
int getQueueCapacity()
int getQueueRemainingCapacity()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2015 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.