Package ch.qos.logback.core

Examples of ch.qos.logback.core.LogbackException


    private LoggerContext getLoggerContext(Map<String, String> props) {
        ILoggerFactory lcObject = LoggerFactory.getILoggerFactory();

        if (!(lcObject instanceof LoggerContext)) {
            throw new LogbackException(
                    "Expected LOGBACK binding with SLF4J, but another log system has taken the place: "
                            + lcObject.getClass().getSimpleName());
        }

        LoggerContext lc = (LoggerContext) lcObject;
View Full Code Here


    } else if (url.toString().endsWith("xml")) {
      JoranConfigurator configurator = new JoranConfigurator();
      configurator.setContext(loggerContext);
      configurator.doConfigure(url);
    } else {
      throw new LogbackException("Unexpected filename extension of file [" + url.toString() + "]. Should be either .groovy or .xml");
    }
  }
View Full Code Here

    } else if (urlString.endsWith("xml")) {
      JoranConfigurator configurator = new JoranConfigurator();
      configurator.setContext(loggerContext);
      configurator.doConfigure(url);
    } else {
      throw new LogbackException("Unexpected filename extension of file [" + url.toString() + "]. Should be either .groovy or .xml");
    }
  }
View Full Code Here

      if (c != null) {
        try {
          c.setContext(loggerContext);
          c.configure(loggerContext);
        } catch (Exception e) {
          throw new LogbackException(String.format("Failed to initialize Configurator: %s using ServiceLoader",
              c != null ? c.getClass().getCanonicalName() : "null"), e);
        }
      } else {
        BasicConfigurator.configure(loggerContext);
      }
View Full Code Here

    private LoggerContext getLoggerContext(Map<String, String> props) {
        ILoggerFactory lcObject = LoggerFactory.getILoggerFactory();

        if (!(lcObject instanceof LoggerContext)) {
            throw new LogbackException(
                    "Expected LOGBACK binding with SLF4J, but another log system has taken the place: "
                    + lcObject.getClass().getSimpleName());
        }

        LoggerContext lc = (LoggerContext) lcObject;
View Full Code Here

    private LoggerContext getLoggerContext(Map<String, String> props) {
        ILoggerFactory lcObject = LoggerFactory.getILoggerFactory();

        if (!(lcObject instanceof LoggerContext)) {
            throw new LogbackException(
                    "Expected LOGBACK binding with SLF4J, but another log system has taken the place: "
                            + lcObject.getClass().getSimpleName());
        }

        LoggerContext lc = (LoggerContext) lcObject;
View Full Code Here

TOP

Related Classes of ch.qos.logback.core.LogbackException

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.