Package ch.qos.logback.classic

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


    long before = System.nanoTime();
    for (int i = 0; i < LEN; i++) {
      logger.debug(LoggingThread.msgLong + " " + i);
    }
    lc.stop();
    StatusPrinter.print(lc);
    double durationPerLog = (System.nanoTime() - before) / (LEN * 1000.0);

    System.out.println("Average duration of " + (durationPerLog)
        + " microseconds per log. Safety mode " + safetyMode);
View Full Code Here


    long before = System.nanoTime();
    for (int i = 0; i < LEN; i++) {
      logger.debug(LoggingThread.msgLong + " " + i);
    }
    lc.stop();
    double durationPerLog = (System.nanoTime() - before) / (LEN * 1000.0);

    System.out.println("Average duration of " + (durationPerLog)
        + " microseconds per log. Safety mode " + safetyMode);
    System.out.println("------------------------------------------------");
View Full Code Here

      logger.debug(msgLong + " " + i);
    }
    // in microseconds
    double durationPerLog = (System.nanoTime() - start) / (LEN * 1000.0);

    lc.stop();

    System.out.println("Average duration of " + (durationPerLog)
        + " microseconds per log. Prudent mode=" + safetyMode);
    System.out.println("------------------------------------------------");
  }
View Full Code Here

      tp.execute(buildArray(logger));
    }

    tp.execute(buildArray(logger));
    tp.printThroughput("File:   ");
    lc.stop();
  }

  static Logger buildLoggerContext(LoggerContext lc) {
    Logger root = lc.getLogger(Logger.ROOT_LOGGER_NAME);
View Full Code Here

    String configFile = args[0];

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

    Logger logger = LoggerFactory.getLogger(SocketClient2.class);
View Full Code Here

  static void configureViaXML_File() {
    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
    try {
      JoranConfigurator configurator = new JoranConfigurator();
      configurator.setContext(lc);
      lc.stop();
      URL url = Loader.getResourceBySelfClassLoader("chapter7/simpleMDC.xml");
      configurator.doConfigure(url);
    } catch (JoranException je) {
      StatusPrinter.print(lc);
    }
View Full Code Here

    Logger logger = lc.getLogger(ExitWoes2.class);

    logger.debug("Hello world.");
   
    lc.stop();
   
    StatusPrinter.print(lc);
  }
}
View Full Code Here

    String configFile = args[0];

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

    Logger logger = LoggerFactory.getLogger(SocketClient2.class);
View Full Code Here

  static void configureViaXML_File() {
    LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
    try {
      JoranConfigurator configurator = new JoranConfigurator();
      configurator.setContext(lc);
      lc.stop();
      URL url = Loader.getResourceBySelfClassLoader("chapters/mdc/simpleMDC.xml");
      configurator.doConfigure(url);
    } catch (JoranException je) {
      StatusPrinter.print(lc);
    }
View Full Code Here

    String configFile = args[0];

    if (configFile.endsWith(".xml")) {
      LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
      JoranConfigurator configurator = new JoranConfigurator();
      lc.stop();
      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.