Skip to content

Instantly share code, notes, and snippets.

@yutax77
Created June 18, 2012 13:31
Show Gist options
  • Save yutax77/2948389 to your computer and use it in GitHub Desktop.
Save yutax77/2948389 to your computer and use it in GitHub Desktop.
How to FORCE update logback's configure file
public void updateConfigure() throws JoranException {
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
ContextInitializer ci = new ContextInitializer(loggerContext);
JoranConfigurator configurator = new JoranConfigurator();
configurator.setContext(loggerContext);
loggerContext.reset();
configurator.doConfigure(ci.findURLOfDefaultConfigurationFile(false));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment