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}.
- Author:
- Ceki Gülcü, Sébastien Pennec Contributor: Sebastian Davids See http://bugzilla.qos.ch/show_bug.cgi?id=35
-
Field Summary
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
ConstructorsConstructorDescriptionJMXConfigurator
(LoggerContext loggerContext, MBeanServer mbs, ObjectName objectName) -
Method Summary
Modifier and TypeMethodDescriptiongetLoggerEffectiveLevel
(String loggerName) getLoggerLevel
(String loggerName) boolean
JMXConfigurator should not be removed subsequent to a LoggerContext reset.void
onLevelChange
(Logger logger, Level level) void
onReset
(LoggerContext context) void
onStart
(LoggerContext context) void
onStop
(LoggerContext context) When the associated LoggerContext is stopped, this configurator must be unregisteredvoid
reloadByFileName
(String fileName) void
reloadByURL
(URL url) void
void
setLoggerLevel
(String loggerName, String levelStr) toString()
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Constructor Details
-
JMXConfigurator
-
-
Method Details
-
reloadDefaultConfiguration
- Specified by:
reloadDefaultConfiguration
in interfaceJMXConfiguratorMBean
- Throws:
JoranException
-
reloadByFileName
- Specified by:
reloadByFileName
in interfaceJMXConfiguratorMBean
- Throws:
JoranException
FileNotFoundException
-
reloadByURL
- Specified by:
reloadByURL
in interfaceJMXConfiguratorMBean
- Throws:
JoranException
-
setLoggerLevel
- Specified by:
setLoggerLevel
in interfaceJMXConfiguratorMBean
-
getLoggerLevel
- Specified by:
getLoggerLevel
in interfaceJMXConfiguratorMBean
-
getLoggerEffectiveLevel
- Specified by:
getLoggerEffectiveLevel
in interfaceJMXConfiguratorMBean
-
getLoggerList
- Specified by:
getLoggerList
in interfaceJMXConfiguratorMBean
-
getStatuses
- Specified by:
getStatuses
in interfaceJMXConfiguratorMBean
-
onStop
When the associated LoggerContext is stopped, this configurator must be unregistered- Specified by:
onStop
in interfaceLoggerContextListener
-
onLevelChange
- Specified by:
onLevelChange
in interfaceLoggerContextListener
-
onReset
- Specified by:
onReset
in interfaceLoggerContextListener
-
isResetResistant
JMXConfigurator should not be removed subsequent to a LoggerContext reset.- Specified by:
isResetResistant
in interfaceLoggerContextListener
- Returns:
-
onStart
- Specified by:
onStart
in interfaceLoggerContextListener
-
toString
-