Examples of doConfigure()


Examples of ch.qos.logback.access.joran.JoranConfigurator.doConfigure()

    File configFile = new File(filename);
    if (configFile.exists()) {
      try {
        JoranConfigurator jc = new JoranConfigurator();
        jc.setContext(this);
        jc.doConfigure(filename);
      } catch (JoranException e) {
        StatusPrinter.print(getStatusManager());
      }
    } else {
      getStatusManager().add(
View Full Code Here

Examples of ch.qos.logback.audit.client.joran.JoranConfigurator.doConfigure()

    }
    JoranConfigurator configurator = new JoranConfigurator();
    configurator.setContext(auditor);

    try {
      configurator.doConfigure(url);
    } catch (JoranException e) {
      throw new AuditException("Configuration failure in " + url, e);
    }

  }
View Full Code Here

Examples of ch.qos.logback.classic.joran.JoranConfigurator.doConfigure()

          JoranConfigurator configurator = new JoranConfigurator();
          configurator.setContext(lc);
          // the context was probably already configured by default configuration rules
          lc.reset();
          try {
            configurator.doConfigure(logbackConfigLocation);
          } catch (JoranException je) {
            // StatusPrinter will handle this
          }

        }
View Full Code Here

Examples of ch.qos.logback.classic.joran.JoranConfigurator.doConfigure()

    private void addTypedFieldToAppender() throws JoranException {
        LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
        JoranConfigurator joranConfigurator = new JoranConfigurator();
        joranConfigurator.setContext(lc);
        joranConfigurator.doConfigure(Resources.getResource("typedFields.xml"));
    }

    private void addStaticFieldToAppender() throws JoranException {
        LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
        JoranConfigurator joranConfigurator = new JoranConfigurator();
View Full Code Here

Examples of ch.qos.logback.classic.joran.JoranConfigurator.doConfigure()

    private void addStaticFieldToAppender() throws JoranException {
        LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
        JoranConfigurator joranConfigurator = new JoranConfigurator();
        joranConfigurator.setContext(lc);
        joranConfigurator.doConfigure(Resources.getResource("staticAdditionalFields.xml"));
    }

    private ImmutableMap<String, Object> addField(ImmutableMap<String, Object> map, String key, String value) {
        return ImmutableMap.<String, Object>builder().putAll(map).put(key,
                value).build();
View Full Code Here

Examples of ch.qos.logback.classic.joran.JoranConfigurator.doConfigure()

        try {

            // Initialize logback
            JoranConfigurator configurator = new JoranConfigurator();
            configurator.setContext(context);
            configurator.doConfigure(logbackConfiguration);

            // Dump any errors that occur during logback init
            StatusPrinter.printInCaseOfErrorsOrWarnings(context);

        }
View Full Code Here

Examples of ch.qos.logback.classic.joran.JoranConfigurator.doConfigure()

  static public void configureLC(LoggerContext lc, String configFile)
      throws JoranException {
    JoranConfigurator configurator = new JoranConfigurator();
    lc.reset();
    configurator.setContext(lc);
    configurator.doConfigure(configFile);
  }
}
View Full Code Here

Examples of ch.qos.logback.classic.joran.JoranConfigurator.doConfigure()

    configurator.setContext(context);

    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);
    }
View Full Code Here

Examples of ch.qos.logback.classic.joran.JoranConfigurator.doConfigure()

  static public void configureLC(LoggerContext lc, String configFile)
      throws JoranException {
    JoranConfigurator configurator = new JoranConfigurator();
    lc.reset();
    configurator.setContext(lc);
    configurator.doConfigure(configFile);
  }
}
View Full Code Here

Examples of ch.qos.logback.classic.joran.JoranConfigurator.doConfigure()

      List<SaxEvent> eventList = jc.recallSafeConfiguration();
      URL mainURL = ConfigurationWatchListUtil.getMainWatchURL(context);
      lc.reset();
      long threshold = System.currentTimeMillis();
      try {
        jc.doConfigure(mainConfigurationURL);
        if (statusChecker.hasXMLParsingErrors(threshold)) {
          fallbackConfiguration(lc, eventList, mainURL);
        }
      } catch (JoranException e) {
        fallbackConfiguration(lc, eventList, mainURL);
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.