Skip to content

Instantly share code, notes, and snippets.

@Rudge
Created July 15, 2016 12:01
Show Gist options
  • Select an option

  • Save Rudge/2c333e889b7066fbc026fe50a359c43a to your computer and use it in GitHub Desktop.

Select an option

Save Rudge/2c333e889b7066fbc026fe50a359c43a to your computer and use it in GitHub Desktop.

Revisions

  1. Rudge created this gist Jul 15, 2016.
    5 changes: 5 additions & 0 deletions Reload logback in runtime
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
    context.reset();
    JoranConfigurator configurator = new JoranConfigurator();
    configurator.setContext(context);
    configurator.doConfigure(new FileInputStream(new File(env.getProperty("logging.path"))));