Package ch.qos.logback.classic.jmx
Class JMXConfigurator
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.classic.jmx.JMXConfigurator
- All Implemented Interfaces:
JMXConfiguratorMBean,LoggerContextListener,ContextAware
public class JMXConfigurator
extends ContextAwareBase
implements JMXConfiguratorMBean, LoggerContextListener
A class that provides access to logback components via JMX.
Since this class implements JMXConfiguratorMBean it has to be
named as JMXConfigurator}.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanprivate static String(package private) LoggerContext(package private) MBeanServer(package private) ObjectName(package private) String(package private) booleanFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
ConstructorsConstructorDescriptionJMXConfigurator(LoggerContext loggerContext, MBeanServer mbs, ObjectName objectName) -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddStatusListener(StatusListener statusListener) private voidgetLoggerEffectiveLevel(String loggerName) getLoggerLevel(String loggerName) booleanJMXConfigurator should not be removed subsequent to a LoggerContext reset.voidonLevelChange(Logger logger, Level level) voidonReset(LoggerContext context) voidonStart(LoggerContext context) voidonStop(LoggerContext context) When the associated LoggerContext is stopped, this configurator must be unregisteredprivate booleanvoidreloadByFileName(String fileName) voidreloadByURL(URL url) void(package private) voidremoveStatusListener(StatusListener statusListener) voidsetLoggerLevel(String loggerName, String levelStr) private voidstop()toString()Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Field Details
-
EMPTY
-
loggerContext
LoggerContext loggerContext -
mbs
MBeanServer mbs -
objectName
ObjectName objectName -
objectNameAsString
String objectNameAsString -
debug
boolean debug -
started
boolean started
-
-
Constructor Details
-
JMXConfigurator
-
-
Method Details
-
previouslyRegisteredListenerWithSameObjectName
private boolean previouslyRegisteredListenerWithSameObjectName() -
reloadDefaultConfiguration
- Specified by:
reloadDefaultConfigurationin interfaceJMXConfiguratorMBean- Throws:
JoranException
-
reloadByFileName
- Specified by:
reloadByFileNamein interfaceJMXConfiguratorMBean- Throws:
JoranExceptionFileNotFoundException
-
addStatusListener
-
removeStatusListener
-
reloadByURL
- Specified by:
reloadByURLin interfaceJMXConfiguratorMBean- Throws:
JoranException
-
setLoggerLevel
- Specified by:
setLoggerLevelin interfaceJMXConfiguratorMBean
-
getLoggerLevel
- Specified by:
getLoggerLevelin interfaceJMXConfiguratorMBean
-
getLoggerEffectiveLevel
- Specified by:
getLoggerEffectiveLevelin interfaceJMXConfiguratorMBean
-
getLoggerList
- Specified by:
getLoggerListin interfaceJMXConfiguratorMBean
-
getStatuses
- Specified by:
getStatusesin interfaceJMXConfiguratorMBean
-
onStop
When the associated LoggerContext is stopped, this configurator must be unregistered- Specified by:
onStopin interfaceLoggerContextListener
-
onLevelChange
- Specified by:
onLevelChangein interfaceLoggerContextListener
-
onReset
- Specified by:
onResetin interfaceLoggerContextListener
-
isResetResistant
public boolean isResetResistant()JMXConfigurator should not be removed subsequent to a LoggerContext reset.- Specified by:
isResetResistantin interfaceLoggerContextListener- Returns:
-
clearFields
private void clearFields() -
stop
private void stop() -
onStart
- Specified by:
onStartin interfaceLoggerContextListener
-
toString
-