fallbackConfiguration(lc, eventList, mainURL);
}
}
private void fallbackConfiguration(LoggerContext lc, List<SaxEvent> eventList, URL mainURL) {
JoranConfigurator joranConfigurator = new JoranConfigurator();
joranConfigurator.setContext(context);
if (eventList != null) {
addWarn("Falling back to previously registered safe configuration.");
try {
lc.reset();
joranConfigurator.informContextOfURLUsedForConfiguration(context, mainURL);
joranConfigurator.doConfigure(eventList);
addInfo("Re-registering previous fallback configuration once more as a fallback configuration point");
joranConfigurator.registerSafeConfiguration();
} catch (JoranException e) {
addError("Unexpected exception thrown by a configuration considered safe.", e);
}
} else {
addWarn("No previous configuration to fall back on.");