Class LoggerConfigAdmin
- java.lang.Object
-
- org.apache.logging.log4j.core.jmx.LoggerConfigAdmin
-
- All Implemented Interfaces:
LoggerConfigAdminMBean
public class LoggerConfigAdmin extends java.lang.Object implements LoggerConfigAdminMBean
Implementation of theLoggerConfigAdminMBeaninterface.
-
-
Field Summary
Fields Modifier and Type Field Description private LoggerConfigloggerConfigprivate LoggerContextloggerContextprivate javax.management.ObjectNameobjectName-
Fields inherited from interface org.apache.logging.log4j.core.jmx.LoggerConfigAdminMBean
PATTERN
-
-
Constructor Summary
Constructors Constructor Description LoggerConfigAdmin(LoggerContext loggerContext, LoggerConfig loggerConfig)Constructs a newLoggerConfigAdminwith the specified LoggerContext and logger config.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getAppenderRefs()Returns a String array with the appender refs configured for the instrumentedLoggerConfig.java.lang.StringgetFilter()Returns a string description of all filters configured for the instrumentedLoggerConfig.java.lang.StringgetLevel()Returns theLoggerConfiglevel as a String.java.lang.StringgetName()Returns the name of the instrumentedLoggerConfig.javax.management.ObjectNamegetObjectName()Returns theObjectNameof this mbean.booleanisAdditive()Returns whether the instrumentedLoggerConfigis additive.booleanisIncludeLocation()Returns whether the instrumentedLoggerConfigis configured to include location.voidsetAdditive(boolean additive)Sets whether the instrumentedLoggerConfigshould be additive.voidsetLevel(java.lang.String level)Sets theLoggerConfiglevel to the specified value.
-
-
-
Field Detail
-
loggerContext
private final LoggerContext loggerContext
-
loggerConfig
private final LoggerConfig loggerConfig
-
objectName
private final javax.management.ObjectName objectName
-
-
Constructor Detail
-
LoggerConfigAdmin
public LoggerConfigAdmin(LoggerContext loggerContext, LoggerConfig loggerConfig)
Constructs a newLoggerConfigAdminwith the specified LoggerContext and logger config.- Parameters:
loggerContext- used in theObjectNamefor this mbeanloggerConfig- the instrumented object
-
-
Method Detail
-
getObjectName
public javax.management.ObjectName getObjectName()
Returns theObjectNameof this mbean.- Returns:
- the
ObjectName - See Also:
LoggerConfigAdminMBean.PATTERN
-
getName
public java.lang.String getName()
Description copied from interface:LoggerConfigAdminMBeanReturns the name of the instrumentedLoggerConfig.- Specified by:
getNamein interfaceLoggerConfigAdminMBean- Returns:
- the name of the LoggerConfig
-
getLevel
public java.lang.String getLevel()
Description copied from interface:LoggerConfigAdminMBeanReturns theLoggerConfiglevel as a String.- Specified by:
getLevelin interfaceLoggerConfigAdminMBean- Returns:
- the
LoggerConfiglevel.
-
setLevel
public void setLevel(java.lang.String level)
Description copied from interface:LoggerConfigAdminMBeanSets theLoggerConfiglevel to the specified value.- Specified by:
setLevelin interfaceLoggerConfigAdminMBean- Parameters:
level- the newLoggerConfiglevel.
-
isAdditive
public boolean isAdditive()
Description copied from interface:LoggerConfigAdminMBeanReturns whether the instrumentedLoggerConfigis additive.- Specified by:
isAdditivein interfaceLoggerConfigAdminMBean- Returns:
trueif the LoggerConfig is additive,falseotherwise
-
setAdditive
public void setAdditive(boolean additive)
Description copied from interface:LoggerConfigAdminMBeanSets whether the instrumentedLoggerConfigshould be additive.- Specified by:
setAdditivein interfaceLoggerConfigAdminMBean- Parameters:
additive-trueif the instrumented LoggerConfig should be additive,falseotherwise
-
isIncludeLocation
public boolean isIncludeLocation()
Description copied from interface:LoggerConfigAdminMBeanReturns whether the instrumentedLoggerConfigis configured to include location.- Specified by:
isIncludeLocationin interfaceLoggerConfigAdminMBean- Returns:
- whether location should be passed downstream
-
getFilter
public java.lang.String getFilter()
Description copied from interface:LoggerConfigAdminMBeanReturns a string description of all filters configured for the instrumentedLoggerConfig.- Specified by:
getFilterin interfaceLoggerConfigAdminMBean- Returns:
- a string description of all configured filters for this LoggerConfig
-
getAppenderRefs
public java.lang.String[] getAppenderRefs()
Description copied from interface:LoggerConfigAdminMBeanReturns a String array with the appender refs configured for the instrumentedLoggerConfig.- Specified by:
getAppenderRefsin interfaceLoggerConfigAdminMBean- Returns:
- the appender refs for the instrumented
LoggerConfig.
-
-