Class AppenderAdmin
- java.lang.Object
-
- org.apache.logging.log4j.core.jmx.AppenderAdmin
-
- All Implemented Interfaces:
AppenderAdminMBean
public class AppenderAdmin extends Object implements AppenderAdminMBean
Implementation of theAppenderAdminMBean
interface.
-
-
Field Summary
-
Fields inherited from interface org.apache.logging.log4j.core.jmx.AppenderAdminMBean
PATTERN
-
-
Constructor Summary
Constructors Constructor Description AppenderAdmin(String contextName, Appender appender)
Constructs a newAppenderAdmin
with the specified contextName and appender.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getErrorHandler()
Returns the result of callingtoString
on the error handler of this appender, or"null"
if no error handler was set.String
getFilter()
Returns a string description of all filters configured for the instrumentedAppender
.String
getLayout()
Returns the result of callingtoString
on theLayout
object of the instrumentedAppender
.String
getName()
Returns the name of the instrumentedAppender
.ObjectName
getObjectName()
Returns theObjectName
of this mbean.boolean
isIgnoreExceptions()
Returns how exceptions thrown on the instrumentedAppender
are handled.
-
-
-
Method Detail
-
getObjectName
public ObjectName getObjectName()
Returns theObjectName
of this mbean.- Returns:
- the
ObjectName
- See Also:
AppenderAdminMBean.PATTERN
-
getName
public String getName()
Description copied from interface:AppenderAdminMBean
Returns the name of the instrumentedAppender
.- Specified by:
getName
in interfaceAppenderAdminMBean
- Returns:
- the name of the Appender
-
getLayout
public String getLayout()
Description copied from interface:AppenderAdminMBean
Returns the result of callingtoString
on theLayout
object of the instrumentedAppender
.- Specified by:
getLayout
in interfaceAppenderAdminMBean
- Returns:
- the
Layout
of the instrumentedAppender
as a string
-
isIgnoreExceptions
public boolean isIgnoreExceptions()
Description copied from interface:AppenderAdminMBean
Returns how exceptions thrown on the instrumentedAppender
are handled.- Specified by:
isIgnoreExceptions
in interfaceAppenderAdminMBean
- Returns:
true
if any exceptions thrown by the Appender will be logged orfalse
if such exceptions are re-thrown.
-
getErrorHandler
public String getErrorHandler()
Description copied from interface:AppenderAdminMBean
Returns the result of callingtoString
on the error handler of this appender, or"null"
if no error handler was set.- Specified by:
getErrorHandler
in interfaceAppenderAdminMBean
- Returns:
- result of calling
toString
on the error handler of this appender, or"null"
-
getFilter
public String getFilter()
Description copied from interface:AppenderAdminMBean
Returns a string description of all filters configured for the instrumentedAppender
.- Specified by:
getFilter
in interfaceAppenderAdminMBean
- Returns:
- a string description of all configured filters for this appender
-
-