private void fallbackConfiguration(LoggerContext lc, List<SaxEvent> eventList, URL mainURL) { // failsafe events are used only in case of errors. Therefore, we must *not* // invoke file inclusion since the included files may be the cause of the error. List<SaxEvent> failsafeEvents = removeIncludeEvents(eventList); JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); ConfigurationWatchList oldCWL = ConfigurationWatchListUtil.getConfigurationWatchList(context); ConfigurationWatchList newCWL = oldCWL.buildClone(); if (failsafeEvents == null || failsafeEvents.isEmpty()) { addWarn("No previous configuration to fall back on."); } else { addWarn(FALLING_BACK_TO_SAFE_CONFIGURATION); try { lc.reset(); ConfigurationWatchListUtil.registerConfigurationWatchList(context, newCWL); joranConfigurator.doConfigure(failsafeEvents); addInfo(RE_REGISTERING_PREVIOUS_SAFE_CONFIGURATION); joranConfigurator.registerSafeConfiguration(eventList); addInfo("after registerSafeConfiguration: " + eventList); } catch (JoranException e) { addError("Unexpected exception thrown by a configuration considered safe.", e); } } }
private void fallbackConfiguration(LoggerContext lc, List<SaxEvent> eventList, URL mainURL) { // failsafe events are used only in case of errors. Therefore, we must *not* // invoke file inclusion since the included files may be the cause of the error. List<SaxEvent> failsafeEvents = removeIncludeEvents(eventList); JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); ConfigurationWatchList oldCWL = ConfigurationWatchListUtil.getConfigurationWatchList(context); ConfigurationWatchList newCWL = oldCWL.buildClone(); if (failsafeEvents == null || failsafeEvents.isEmpty()) { addWarn("No previous configuration to fall back on."); } else { addWarn(FALLING_BACK_TO_SAFE_CONFIGURATION); try { lc.reset(); ConfigurationWatchListUtil.registerConfigurationWatchList(context, newCWL); joranConfigurator.doConfigure(failsafeEvents); addInfo(RE_REGISTERING_PREVIOUS_SAFE_CONFIGURATION); joranConfigurator.registerSafeConfiguration(eventList); addInfo("after registerSafeConfiguration: " + eventList); } catch (JoranException e) { addError("Unexpected exception thrown by a configuration considered safe.", e); } } }
private void fallbackConfiguration(LoggerContext lc, List<SaxEvent> eventList, URL mainURL) { // failsafe events are used only in case of errors. Therefore, we must *not* // invoke file inclusion since the included files may be the cause of the error. List<SaxEvent> failsafeEvents = removeIncludeEvents(eventList); JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); ConfigurationWatchList oldCWL = ConfigurationWatchListUtil.getConfigurationWatchList(context); ConfigurationWatchList newCWL = oldCWL.buildClone(); if (failsafeEvents == null || failsafeEvents.isEmpty()) { addWarn("No previous configuration to fall back on."); } else { addWarn(FALLING_BACK_TO_SAFE_CONFIGURATION); try { lc.reset(); ConfigurationWatchListUtil.registerConfigurationWatchList(context, newCWL); joranConfigurator.doConfigure(failsafeEvents); addInfo(RE_REGISTERING_PREVIOUS_SAFE_CONFIGURATION); joranConfigurator.registerSafeConfiguration(eventList); addInfo("after registerSafeConfiguration: " + eventList); } catch (JoranException e) { addError("Unexpected exception thrown by a configuration considered safe.", e); } } }
private void fallbackConfiguration(LoggerContext lc, List<SaxEvent> eventList, URL mainURL) { // failsafe events are used only in case of errors. Therefore, we must *not* // invoke file inclusion since the included files may be the cause of the error. List<SaxEvent> failsafeEvents = removeIncludeEvents(eventList); JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); ConfigurationWatchList oldCWL = ConfigurationWatchListUtil.getConfigurationWatchList(context); ConfigurationWatchList newCWL = oldCWL.buildClone(); if (failsafeEvents == null || failsafeEvents.isEmpty()) { addWarn("No previous configuration to fall back on."); } else { addWarn(FALLING_BACK_TO_SAFE_CONFIGURATION); try { lc.reset(); ConfigurationWatchListUtil.registerConfigurationWatchList(context, newCWL); joranConfigurator.doConfigure(failsafeEvents); addInfo(RE_REGISTERING_PREVIOUS_SAFE_CONFIGURATION); joranConfigurator.registerSafeConfiguration(eventList); addInfo("after registerSafeConfiguration: " + eventList); } catch (JoranException e) { addError("Unexpected exception thrown by a configuration considered safe.", e); } } }
private void fallbackConfiguration(LoggerContext lc, List<SaxEvent> eventList, URL mainURL) { // failsafe events are used only in case of errors. Therefore, we must *not* // invoke file inclusion since the included files may be the cause of the error. List<SaxEvent> failsafeEvents = removeIncludeEvents(eventList); JoranConfigurator joranConfigurator = new JoranConfigurator(); joranConfigurator.setContext(context); ConfigurationWatchList oldCWL = ConfigurationWatchListUtil.getConfigurationWatchList(context); ConfigurationWatchList newCWL = oldCWL.buildClone(); if (failsafeEvents == null || failsafeEvents.isEmpty()) { addWarn("No previous configuration to fall back on."); } else { addWarn(FALLING_BACK_TO_SAFE_CONFIGURATION); try { lc.reset(); ConfigurationWatchListUtil.registerConfigurationWatchList(context, newCWL); joranConfigurator.doConfigure(failsafeEvents); addInfo(RE_REGISTERING_PREVIOUS_SAFE_CONFIGURATION); joranConfigurator.registerSafeConfiguration(eventList); addInfo("after registerSafeConfiguration: " + eventList); } catch (JoranException e) { addError("Unexpected exception thrown by a configuration considered safe.", e); } } }