@Test public void resetTest() { Logger root = lc.getLogger(Logger.ROOT_LOGGER_NAME); Logger a = lc.getLogger("a"); Logger ab = lc.getLogger("a.b"); ab.setLevel(Level.WARN); root.setLevel(Level.INFO); lc.reset(); assertEquals(Level.DEBUG, root.getEffectiveLevel()); assertTrue(root.isDebugEnabled()); assertEquals(Level.DEBUG, a.getEffectiveLevel()); assertEquals(Level.DEBUG, ab.getEffectiveLevel()); assertEquals(Level.DEBUG, root.getLevel()); assertNull(a.getLevel()); assertNull(ab.getLevel()); }
@Override public void reset() { resetCount++; super.reset(); initEvaluatorMap(); initCollisionMaps(); root.recursiveReset(); resetTurboFilterList(); cancelScheduledTasks(); fireOnReset(); resetListenersExceptResetResistant(); resetStatusListeners(); }
LoggerContext extends ContextBase implements ILoggerFactory, LifeCycle { @Override public void reset() { resetCount++; super.reset(); initEvaluatorMap(); initCollisionMaps(); root.recursiveReset(); resetTurboFilterList(); cancelScheduledTasks(); fireOnReset(); resetListenersExceptResetResistant(); resetStatusListeners(); } }
LoggerContext extends ContextBase implements ILoggerFactory, LifeCycle { @Override public void reset() { resetCount++; super.reset(); initEvaluatorMap(); initCollisionMaps(); root.recursiveReset(); resetTurboFilterList(); cancelScheduledTasks(); fireOnReset(); resetListenersExceptResetResistant(); resetStatusListeners(); } LoggerContext(); }
LoggerContext extends ContextBase implements ILoggerFactory, LifeCycle { @Override public void reset() { resetCount++; super.reset(); initEvaluatorMap(); initCollisionMaps(); root.recursiveReset(); resetTurboFilterList(); cancelScheduledTasks(); fireOnReset(); resetListenersExceptResetResistant(); resetStatusListeners(); } LoggerContext(); @Override void putProperty(String key, String val); @Override void setName(String name); final Logger getLogger(final Class<?> clazz); @Override Logger getLogger(final String name); Logger exists(String name); List<Logger> getLoggerList(); LoggerContextVO getLoggerContextRemoteView(); void setPackagingDataEnabled(boolean packagingDataEnabled); boolean isPackagingDataEnabled(); @Override void reset(); TurboFilterList getTurboFilterList(); void addTurboFilter(TurboFilter newFilter); void resetTurboFilterList(); void addListener(LoggerContextListener listener); void removeListener(LoggerContextListener listener); List<LoggerContextListener> getCopyOfListenerList(); void start(); void stop(); @Override String toString(); int getMaxCallerDataDepth(); void setMaxCallerDataDepth(int maxCallerDataDepth); List<String> getFrameworkPackages(); SequenceNumberGenerator getSequenceNumberGenerator(); }
LoggerContext extends ContextBase implements ILoggerFactory, LifeCycle { @Override public void reset() { resetCount++; super.reset(); initEvaluatorMap(); initCollisionMaps(); root.recursiveReset(); resetTurboFilterList(); cancelScheduledTasks(); fireOnReset(); resetListenersExceptResetResistant(); resetStatusListeners(); } LoggerContext(); @Override void putProperty(String key, String val); @Override void setName(String name); final Logger getLogger(final Class<?> clazz); @Override Logger getLogger(final String name); Logger exists(String name); List<Logger> getLoggerList(); LoggerContextVO getLoggerContextRemoteView(); void setPackagingDataEnabled(boolean packagingDataEnabled); boolean isPackagingDataEnabled(); @Override void reset(); TurboFilterList getTurboFilterList(); void addTurboFilter(TurboFilter newFilter); void resetTurboFilterList(); void addListener(LoggerContextListener listener); void removeListener(LoggerContextListener listener); List<LoggerContextListener> getCopyOfListenerList(); void start(); void stop(); @Override String toString(); int getMaxCallerDataDepth(); void setMaxCallerDataDepth(int maxCallerDataDepth); List<String> getFrameworkPackages(); SequenceNumberGenerator getSequenceNumberGenerator(); static final boolean DEFAULT_PACKAGING_DATA; }