Package ch.qos.logback.classic.util

Examples of ch.qos.logback.classic.util.ContextInitializer


    try {
      File twillLogback = new File(Constants.Files.LOGBACK_TEMPLATE);
      if (twillLogback.exists()) {
        configurator.doConfigure(twillLogback);
      }
      new ContextInitializer(context).autoConfig();
    } catch (JoranException e) {
      throw Throwables.propagate(e);
    }
    doConfigure(configurator, getLogConfig(getLoggerLevel(context.getLogger(Logger.ROOT_LOGGER_NAME))));
  }
View Full Code Here


   * Package access for testing purposes.
   */
  void init() {
    try {
      try {
        new ContextInitializer(defaultLoggerContext).autoConfig();
      } catch (JoranException je) {
        Util.report("Failed to auto configure default logger context", je);
      }
      StatusPrinter.printInCaseOfErrorsOrWarnings(defaultLoggerContext);
      contextSelectorBinder.init(defaultLoggerContext, KEY);
View Full Code Here

   * Package access for testing purposes.
   */
  void init() {
    try {
      try {
        new ContextInitializer(defaultLoggerContext).autoConfig();
      } catch (JoranException je) {
        Util.report("Failed to auto configure default logger context", je);
      }
      // logback-292
      if(!StatusUtil.contextHasStatusListener(defaultLoggerContext)) {
View Full Code Here

      password = args[3];
    }

    LoggerContext loggerContext = (LoggerContext) LoggerFactory
        .getILoggerFactory();
    new ContextInitializer(loggerContext).autoConfig();

    new JMSTopicSink(tcfBindingName, topicBindingName, username, password);

    BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
    // Loop until the word "exit" is typed
View Full Code Here

    }
    return false;
  }

  public void reloadDefaultConfiguration() throws JoranException {
    ContextInitializer ci = new ContextInitializer(loggerContext);
    URL url = ci.findURLOfDefaultConfigurationFile(true);
    reloadByURL(url);
  }
View Full Code Here

      password = args[3];
    }

    LoggerContext loggerContext = (LoggerContext) LoggerFactory
        .getILoggerFactory();
    new ContextInitializer(loggerContext).autoConfig();

    new JMSQueueSink(qcfBindingName, queueBindingName, username, password);

    BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
    // Loop until the word "exit" is typed
View Full Code Here

        URL url = findConfigFileURL(ctx, loggerContext);
        if (url != null) {
          configureLoggerContextByURL(loggerContext, url);
        } else {
          try {
            new ContextInitializer(loggerContext).autoConfig();
          } catch (JoranException je) {
          }
        }
        // logback-292
        if (!StatusUtil.contextHasStatusListener(loggerContext))
View Full Code Here

   * Package access for testing purposes.
   */
  void init() {
    try {
      try {
        new ContextInitializer(defaultLoggerContext).autoConfig();
      } catch (JoranException je) {
        Util.reportFailure("Failed to auto configure default logger context",
            je);
      }
      StatusPrinter.printIfErrorsOccured(defaultLoggerContext);
View Full Code Here

        URL url = findConfigFileURL(ctx, loggerContext);
        if (url != null) {
          configureLoggerContextByURL(loggerContext, url);
        } else {
          try {
            new ContextInitializer(loggerContext).autoConfig();
          } catch (JoranException je) {
          }
        }
        StatusPrinter.printIfErrorsOccured(loggerContext);
      }
View Full Code Here

        URL url = findConfigFileURL(ctx, loggerContext);
        if (url != null) {
          configureLoggerContextByURL(loggerContext, url);
        } else {
          try {
            new ContextInitializer(loggerContext).autoConfig();
          } catch (JoranException je) {
          }
        }
        // logback-292
        if (!StatusUtil.contextHasStatusListener(loggerContext))
View Full Code Here

TOP

Related Classes of ch.qos.logback.classic.util.ContextInitializer

Copyright © 2018 www.massapicom. 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.