@Test public void testReloadDefaultConfiguration() throws Exception { String objectNameAsStr = "ch.qos" + diff + ":Name=" + lc.getName() + ",Type=" + this.getClass().getName(); ObjectName on = MBeanUtil.string2ObjectName(lc, this, objectNameAsStr); JMXConfigurator configurator = new JMXConfigurator(lc, mbs, on); configurator.setLoggerLevel(testLogger.getName(), "DEBUG"); assertEquals(Level.DEBUG, testLogger.getLevel()); configurator.reloadDefaultConfiguration(); assertNull(testLogger.getLevel()); assertEquals(Level.DEBUG, lc.getLogger(ROOT_LOGGER_NAME).getLevel()); MBeanUtil.unregister(lc, mbs, on, this); }
public void reloadDefaultConfiguration() throws JoranException { ContextInitializer ci = new ContextInitializer(loggerContext); URL url = ci.findURLOfDefaultConfigurationFile(true); reloadByURL(url); }
JMXConfigurator extends ContextAwareBase implements JMXConfiguratorMBean, LoggerContextListener { public void reloadDefaultConfiguration() throws JoranException { ContextInitializer ci = new ContextInitializer(loggerContext); URL url = ci.findURLOfDefaultConfigurationFile(true); reloadByURL(url); } }
JMXConfigurator extends ContextAwareBase implements JMXConfiguratorMBean, LoggerContextListener { public void reloadDefaultConfiguration() throws JoranException { ContextInitializer ci = new ContextInitializer(loggerContext); URL url = ci.findURLOfDefaultConfigurationFile(true); reloadByURL(url); } JMXConfigurator(LoggerContext loggerContext, MBeanServer mbs, ObjectName objectName); }
JMXConfigurator extends ContextAwareBase implements JMXConfiguratorMBean, LoggerContextListener { public void reloadDefaultConfiguration() throws JoranException { ContextInitializer ci = new ContextInitializer(loggerContext); URL url = ci.findURLOfDefaultConfigurationFile(true); reloadByURL(url); } JMXConfigurator(LoggerContext loggerContext, MBeanServer mbs, ObjectName objectName); void reloadDefaultConfiguration(); void reloadByFileName(String fileName); void reloadByURL(URL url); void setLoggerLevel(String loggerName, String levelStr); String getLoggerLevel(String loggerName); String getLoggerEffectiveLevel(String loggerName); List<String> getLoggerList(); List<String> getStatuses(); void onStop(LoggerContext context); void onLevelChange(Logger logger, Level level); void onReset(LoggerContext context); boolean isResetResistant(); void onStart(LoggerContext context); @Override String toString(); }
JMXConfigurator extends ContextAwareBase implements JMXConfiguratorMBean, LoggerContextListener { public void reloadDefaultConfiguration() throws JoranException { ContextInitializer ci = new ContextInitializer(loggerContext); URL url = ci.findURLOfDefaultConfigurationFile(true); reloadByURL(url); } JMXConfigurator(LoggerContext loggerContext, MBeanServer mbs, ObjectName objectName); void reloadDefaultConfiguration(); void reloadByFileName(String fileName); void reloadByURL(URL url); void setLoggerLevel(String loggerName, String levelStr); String getLoggerLevel(String loggerName); String getLoggerEffectiveLevel(String loggerName); List<String> getLoggerList(); List<String> getStatuses(); void onStop(LoggerContext context); void onLevelChange(Logger logger, Level level); void onReset(LoggerContext context); boolean isResetResistant(); void onStart(LoggerContext context); @Override String toString();  }