Class AsyncAppenderAdmin
java.lang.Object
org.apache.logging.log4j.core.jmx.AsyncAppenderAdmin
- All Implemented Interfaces:
AsyncAppenderAdminMBean
Implementation of the
AsyncAppenderAdminMBean interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AsyncAppenderprivate final Stringprivate final ObjectNameFields inherited from interface org.apache.logging.log4j.core.jmx.AsyncAppenderAdminMBean
PATTERN -
Constructor Summary
ConstructorsConstructorDescriptionAsyncAppenderAdmin(String contextName, AsyncAppender appender) Constructs a newAsyncAppenderAdminwith the specified contextName and async appender. -
Method Summary
Modifier and TypeMethodDescriptionString[]Returns a String array with the appender refs configured for the instrumentedAsyncAppender.Returns the result of callingtoStringon the error handler of this appender, or"null"if no error handler was set.Returns the name of the appender that any errors are logged to ornull.Returns a string description of all filters configured for the instrumentedAsyncAppender.Returns the result of callingtoStringon theLayoutobject of the instrumentedAsyncAppender.getName()Returns the name of the instrumentedAsyncAppender.Returns theObjectNameof this mbean.intintbooleanReturnstrueif this AsyncAppender will block when the queue is full, orfalseif events are dropped when the queue is full.booleanReturns how exceptions thrown on the instrumentedAsyncAppenderare handled.booleanReturnstrueif 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 Details
-
contextName
-
asyncAppender
-
objectName
-
-
Constructor Details
-
AsyncAppenderAdmin
Constructs a newAsyncAppenderAdminwith the specified contextName and async appender.- Parameters:
contextName- used in theObjectNamefor this mbeanappender- the instrumented object
-
-
Method Details
-
getObjectName
Returns theObjectNameof this mbean.- Returns:
- the
ObjectName - See Also:
-
getName
Description copied from interface:AsyncAppenderAdminMBeanReturns the name of the instrumentedAsyncAppender.- Specified by:
getNamein interfaceAsyncAppenderAdminMBean- Returns:
- the name of the AsyncAppender
-
getLayout
Description copied from interface:AsyncAppenderAdminMBeanReturns the result of callingtoStringon theLayoutobject of the instrumentedAsyncAppender.- Specified by:
getLayoutin interfaceAsyncAppenderAdminMBean- Returns:
- the
Layoutof the instrumentedAsyncAppenderas a string
-
isIgnoreExceptions
public boolean isIgnoreExceptions()Description copied from interface:AsyncAppenderAdminMBeanReturns how exceptions thrown on the instrumentedAsyncAppenderare handled.- Specified by:
isIgnoreExceptionsin interfaceAsyncAppenderAdminMBean- Returns:
trueif any exceptions thrown by the AsyncAppender will be logged orfalseif such exceptions are re-thrown.
-
getErrorHandler
Description copied from interface:AsyncAppenderAdminMBeanReturns the result of callingtoStringon the error handler of this appender, or"null"if no error handler was set.- Specified by:
getErrorHandlerin interfaceAsyncAppenderAdminMBean- Returns:
- result of calling
toStringon the error handler of this appender, or"null"
-
getFilter
Description copied from interface:AsyncAppenderAdminMBeanReturns a string description of all filters configured for the instrumentedAsyncAppender.- Specified by:
getFilterin interfaceAsyncAppenderAdminMBean- Returns:
- a string description of all configured filters for this appender
-
getAppenderRefs
Description copied from interface:AsyncAppenderAdminMBeanReturns a String array with the appender refs configured for the instrumentedAsyncAppender.- Specified by:
getAppenderRefsin interfaceAsyncAppenderAdminMBean- Returns:
- the appender refs for the instrumented
AsyncAppender.
-
isIncludeLocation
public boolean isIncludeLocation()Returnstrueif 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.- Specified by:
isIncludeLocationin interfaceAsyncAppenderAdminMBean- Returns:
trueif location is included with every event,falseotherwise
-
isBlocking
public boolean isBlocking()Returnstrueif this AsyncAppender will block when the queue is full, orfalseif events are dropped when the queue is full.- Specified by:
isBlockingin interfaceAsyncAppenderAdminMBean- Returns:
- whether this AsyncAppender will block or drop events when the queue is full.
-
getErrorRef
Returns the name of the appender that any errors are logged to ornull.- Specified by:
getErrorRefin interfaceAsyncAppenderAdminMBean- Returns:
- the name of the appender that any errors are logged to or
null
-
getQueueCapacity
public int getQueueCapacity()- Specified by:
getQueueCapacityin interfaceAsyncAppenderAdminMBean
-
getQueueRemainingCapacity
public int getQueueRemainingCapacity()- Specified by:
getQueueRemainingCapacityin interfaceAsyncAppenderAdminMBean
-