Examples of shutdownAndReset()


Examples of ch.qos.logback.classic.LoggerContext.shutdownAndReset()

    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();

    try {
      JoranConfigurator configurator = new JoranConfigurator();
      configurator.setContext(lc);
      lc.shutdownAndReset();
      configurator.doConfigure(args[0]);
    } catch (JoranException je) {
      je.printStackTrace();
    }
    logger.debug("**Hello {}", new Bar());
View Full Code Here

Examples of ch.qos.logback.classic.LoggerContext.shutdownAndReset()

   

    try {
      JoranConfigurator configurator = new JoranConfigurator();
      configurator.setContext(lc);
      lc.shutdownAndReset();
      configurator.doConfigure(args[0]);
    } catch (JoranException je) {
      StatusPrinter.print(lc);
    }
View Full Code Here

Examples of ch.qos.logback.classic.LoggerContext.shutdownAndReset()

  }

  public void reload() {
    LoggerContext lc = (LoggerContext) context;
    addInfo("Shutting down context: " + lc.getName());
    lc.shutdownAndReset();
    try {
      new ContextInitializer(lc).autoConfig();
      addInfo("Context: " + lc.getName() + " reloaded.");
    } catch(JoranException je) {
      addError("Reloading of context: " + lc.getName() + " failed.", je);
View Full Code Here

Examples of ch.qos.logback.classic.LoggerContext.shutdownAndReset()

  }

  public void reload(String fileName) throws JoranException {
    LoggerContext lc = (LoggerContext) context;
    addInfo("Shutting down context: " + lc.getName());
    lc.shutdownAndReset();
    JoranConfigurator configurator = new JoranConfigurator();
    configurator.setContext(lc);
    configurator.doConfigure(fileName);
    addInfo("Context: " + lc.getName() + " reloaded.");
  }
View Full Code Here

Examples of ch.qos.logback.classic.LoggerContext.shutdownAndReset()

  }

  public void reload(URL url) throws JoranException {
    LoggerContext lc = (LoggerContext) context;
    addInfo("Shutting down context: " + lc.getName());
    lc.shutdownAndReset();
    new ContextInitializer(lc).configureByResource(url);
    addInfo("Context: " + lc.getName() + " reloaded.");
  }

  public void setLoggerLevel(String loggerName, String levelStr) {
View Full Code Here

Examples of ch.qos.logback.classic.LoggerContext.shutdownAndReset()

    Logger logger = LoggerFactory.getLogger(MyAppWithConfigFile.class);
    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();

    try {
      JoranConfigurator configurator = new JoranConfigurator();
      lc.shutdownAndReset();
      configurator.setContext(lc);
      configurator.doConfigure(args[0]);
    } catch (JoranException je) {
      StatusPrinter.print(lc.getStatusManager());
    }
View Full Code Here

Examples of ch.qos.logback.classic.LoggerContext.shutdownAndReset()

    ch.qos.logback.classic.BasicConfigurator.configureDefaultContext();
  }

  public static void resetConfiguration() {
    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
    lc.shutdownAndReset();
  }
}
View Full Code Here

Examples of ch.qos.logback.classic.LoggerContext.shutdownAndReset()

    Logger logger = LoggerFactory.getLogger(SampleLogging.class);
    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();

    try {
      JoranConfigurator configurator = new JoranConfigurator();
      lc.shutdownAndReset();
      configurator.setContext(lc);
      configurator.doConfigure(args[0]);
    } catch (JoranException je) {
      StatusPrinter.print(lc);
    }
View Full Code Here

Examples of ch.qos.logback.classic.LoggerContext.shutdownAndReset()

    }

    if (configFile.endsWith(".xml")) {
      LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
      JoranConfigurator configurator = new JoranConfigurator();
      lc.shutdownAndReset();
      configurator.setContext(lc);
      configurator.doConfigure(configFile);
      //StatusPrinter.print(lc);
    }
  }
View Full Code Here

Examples of ch.qos.logback.classic.LoggerContext.shutdownAndReset()

    String configFile = args[0];

    if (configFile.endsWith(".xml")) {
      LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
      JoranConfigurator configurator = new JoranConfigurator();
      lc.shutdownAndReset();
      configurator.setContext(lc);
      configurator.doConfigure(configFile);
    }

    Logger logger = LoggerFactory.getLogger(SocketClient2.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.