Class LoggerConfigAdmin
java.lang.Object
org.apache.logging.log4j.core.jmx.LoggerConfigAdmin
- All Implemented Interfaces:
LoggerConfigAdminMBean
Implementation of the
LoggerConfigAdminMBean interface.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LoggerConfigprivate final LoggerContextprivate final ObjectNameFields inherited from interface org.apache.logging.log4j.core.jmx.LoggerConfigAdminMBean
PATTERN -
Constructor Summary
ConstructorsConstructorDescriptionLoggerConfigAdmin(LoggerContext loggerContext, LoggerConfig loggerConfig) Constructs a newLoggerConfigAdminwith the specified LoggerContext and logger config. -
Method Summary
Modifier and TypeMethodDescriptionString[]Returns a String array with the appender refs configured for the instrumentedLoggerConfig.Returns a string description of all filters configured for the instrumentedLoggerConfig.getLevel()Returns theLoggerConfiglevel as a String.getName()Returns the name of the instrumentedLoggerConfig.Returns theObjectNameof this mbean.booleanReturns whether the instrumentedLoggerConfigis additive.booleanReturns whether the instrumentedLoggerConfigis configured to include location.voidsetAdditive(boolean additive) Sets whether the instrumentedLoggerConfigshould be additive.voidSets theLoggerConfiglevel to the specified value.
-
Field Details
-
loggerContext
-
loggerConfig
-
objectName
-
-
Constructor Details
-
LoggerConfigAdmin
Constructs a newLoggerConfigAdminwith the specified LoggerContext and logger config.- Parameters:
loggerContext- used in theObjectNamefor this mbeanloggerConfig- the instrumented object
-
-
Method Details
-
getObjectName
Returns theObjectNameof this mbean.- Returns:
- the
ObjectName - See Also:
-
getName
Description copied from interface:LoggerConfigAdminMBeanReturns the name of the instrumentedLoggerConfig.- Specified by:
getNamein interfaceLoggerConfigAdminMBean- Returns:
- the name of the LoggerConfig
-
getLevel
Description copied from interface:LoggerConfigAdminMBeanReturns theLoggerConfiglevel as a String.- Specified by:
getLevelin interfaceLoggerConfigAdminMBean- Returns:
- the
LoggerConfiglevel.
-
setLevel
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
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
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.
-