Class LoggerConfigAdmin
java.lang.Object
org.apache.logging.log4j.core.jmx.LoggerConfigAdmin
- All Implemented Interfaces:
LoggerConfigAdminMBean
Implementation of the
LoggerConfigAdminMBean
interface.-
Field Summary
Fields inherited from interface org.apache.logging.log4j.core.jmx.LoggerConfigAdminMBean
PATTERN
-
Constructor Summary
ConstructorDescriptionLoggerConfigAdmin
(LoggerContext loggerContext, LoggerConfig loggerConfig) Constructs a newLoggerConfigAdmin
with 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 theLoggerConfig
level as a String.getName()
Returns the name of the instrumentedLoggerConfig
.Returns theObjectName
of this mbean.boolean
Returns whether the instrumentedLoggerConfig
is additive.boolean
Returns whether the instrumentedLoggerConfig
is configured to include location.void
setAdditive
(boolean additive) Sets whether the instrumentedLoggerConfig
should be additive.void
Sets theLoggerConfig
level to the specified value.
-
Constructor Details
-
LoggerConfigAdmin
Constructs a newLoggerConfigAdmin
with the specified LoggerContext and logger config.- Parameters:
loggerContext
- used in theObjectName
for this mbeanloggerConfig
- the instrumented object
-
-
Method Details
-
getObjectName
Returns theObjectName
of this mbean.- Returns:
- the
ObjectName
- See Also:
-
getName
Description copied from interface:LoggerConfigAdminMBean
Returns the name of the instrumentedLoggerConfig
.- Specified by:
getName
in interfaceLoggerConfigAdminMBean
- Returns:
- the name of the LoggerConfig
-
getLevel
Description copied from interface:LoggerConfigAdminMBean
Returns theLoggerConfig
level as a String.- Specified by:
getLevel
in interfaceLoggerConfigAdminMBean
- Returns:
- the
LoggerConfig
level.
-
setLevel
Description copied from interface:LoggerConfigAdminMBean
Sets theLoggerConfig
level to the specified value.- Specified by:
setLevel
in interfaceLoggerConfigAdminMBean
- Parameters:
level
- the newLoggerConfig
level.
-
isAdditive
public boolean isAdditive()Description copied from interface:LoggerConfigAdminMBean
Returns whether the instrumentedLoggerConfig
is additive.- Specified by:
isAdditive
in interfaceLoggerConfigAdminMBean
- Returns:
true
if the LoggerConfig is additive,false
otherwise
-
setAdditive
public void setAdditive(boolean additive) Description copied from interface:LoggerConfigAdminMBean
Sets whether the instrumentedLoggerConfig
should be additive.- Specified by:
setAdditive
in interfaceLoggerConfigAdminMBean
- Parameters:
additive
-true
if the instrumented LoggerConfig should be additive,false
otherwise
-
isIncludeLocation
public boolean isIncludeLocation()Description copied from interface:LoggerConfigAdminMBean
Returns whether the instrumentedLoggerConfig
is configured to include location.- Specified by:
isIncludeLocation
in interfaceLoggerConfigAdminMBean
- Returns:
- whether location should be passed downstream
-
getFilter
Description copied from interface:LoggerConfigAdminMBean
Returns a string description of all filters configured for the instrumentedLoggerConfig
.- Specified by:
getFilter
in interfaceLoggerConfigAdminMBean
- Returns:
- a string description of all configured filters for this LoggerConfig
-
getAppenderRefs
Description copied from interface:LoggerConfigAdminMBean
Returns a String array with the appender refs configured for the instrumentedLoggerConfig
.- Specified by:
getAppenderRefs
in interfaceLoggerConfigAdminMBean
- Returns:
- the appender refs for the instrumented
LoggerConfig
.
-