Package ch.qos.logback.classic.util

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


      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


      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

   * 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

    }
    return false;
  }

  public void reloadDefaultConfiguration() throws JoranException {
    ContextInitializer ci = new ContextInitializer(loggerContext);
    URL url = ci.findURLOfDefaultConfigurationFile(true);
    reloadByURL(url);
  }
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

 
  public static class DefaultLogbackConfigLocationLocator implements LogbackConfigLocationLocator{
    @Override
    public InputStream getLogbackConfigLocation() {
      LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
      ContextInitializer ci = new ContextInitializer(loggerContext);
      try {
        return ci.findURLOfDefaultConfigurationFile(true).openStream();
      } catch (Exception e) {
        return null;
      }
    }
View Full Code Here

            } catch (JoranException e) {
              StatusPrinter.print(loggerContext);
            }
          } else {
            try {
              ContextInitializer ctxInit = new ContextInitializer(loggerContext);
              ctxInit.autoConfig();
            } catch (JoranException je) {
              StatusPrinter.print(loggerContext);
            }
          }
          if (debug) {
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

    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

    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

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.