Package ch.qos.logback.classic

Examples of ch.qos.logback.classic.Level


            // verify log level
            if (level == null) {
                throw new ConfigurationException(LogConfigManager.LOG_LEVEL, "Value required");
            }
            // TODO: support numeric levels !
            final Level logLevel = Level.toLevel(level);
            if (logLevel == null) {
                throw new ConfigurationException(LogConfigManager.LOG_LEVEL, "Unsupported value: " + level);
            }

            // verify pattern
View Full Code Here


        String[] entryValues = s.split(":");
        if (entryValues.length != 2) {
            throw new IllegalArgumentException(s +" is an illegal loggers entry.  Must be of form 'log.name:LEVEL");
        }
        String name = entryValues[0];
        Level level = Level.valueOf(entryValues[1]);
        return new LogbackEntry(name, level);
    }
View Full Code Here

    if (opsContext != null) {
      ILoggingEvent event = (ILoggingEvent) e;

      // Note that we can get the unformatted message in getMessage(), presumably along with the parameters...
      String message = event.getFormattedMessage();
      Level level = event.getLevel();
      int levelInt = level.toInt();

      List<String[]> exceptionStacks = null;

      IThrowableProxy throwableInformation = event.getThrowableProxy();
      while (throwableInformation != null) {
View Full Code Here

            // Note that we can get the unformatted message in getMessage(),
            // presumably along with the parameters...
            String loggerName = event.getLoggerName();
            String message = event.getFormattedMessage();
            Level level = event.getLevel();
            int levelInt = level.toInt();

            List<String[]> exceptionStacks = null;

            IThrowableProxy throwableInformation = event.getThrowableProxy();
            while (throwableInformation != null) {
View Full Code Here

   
    Logger logger = lc.getLogger(loggerName);
    if ("null".equalsIgnoreCase(levelStr)) {
      logger.setLevel(null);
    } else {
      Level level = Level.toLevel(levelStr, null);
      if (level != null) {
        logger.setLevel(level);
      }
    }
  }
View Full Code Here

    LoggerContext loggerContext = (LoggerContext) this.context;
    root = loggerContext.getLogger(Logger.ROOT_LOGGER_NAME);

    String levelStr =  ec.subst(attributes.getValue(ActionConst.LEVEL_ATTRIBUTE));
    if (!OptionHelper.isEmpty(levelStr)) {
      Level level = Level.toLevel(levelStr);
      addInfo("Setting level of ROOT logger to " + level);
      root.setLevel(level);
    }
    ec.pushObject(root);
  }
View Full Code Here

          || ActionConst.NULL.equalsIgnoreCase(levelStr)) {
        addInfo("Setting level of logger [" + loggerName
            + "] to null, i.e. INHERITED");
        logger.setLevel(null);
      } else {
        Level level = Level.toLevel(levelStr);
        addInfo("Setting level of logger [" + loggerName + "] to " + level);
        logger.setLevel(level);
      }
    }
View Full Code Here

   * methods i.e TRACE, DEBUG, WARN, INFO and ERROR are converted.
   *
   */
  static public int convert(ILoggingEvent event) {

    Level level = event.getLevel();

    switch (level.levelInt) {
    case Level.ERROR_INT:
      return SyslogConstants.ERROR_SEVERITY;
    case Level.WARN_INT:
View Full Code Here

    String mdcValue = MDC.get(this.key);
    if (!isStarted()) {
      return FilterReply.NEUTRAL;
    }

    Level levelAssociatedWithMDCValue = null;
    if (mdcValue != null) {
      levelAssociatedWithMDCValue = valueLevelMap.get(mdcValue);
    }
    if (levelAssociatedWithMDCValue == null) {
      levelAssociatedWithMDCValue = defaultThreshold;
View Full Code Here

    Logger logger = lc.getLogger(loggerName);
    if ("null".equalsIgnoreCase(levelStr)) {
      logger.setLevel(null);
    } else {
      Level level = Level.toLevel(levelStr, null);
      if (level != null) {
        logger.setLevel(level);
      }
    }
  }
View Full Code Here

TOP

Related Classes of ch.qos.logback.classic.Level

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.