Package org.apache.log4j

Examples of org.apache.log4j.Level.toInt()


    } else {
        level2 = Level.toLevel(resolver.getValue("LEVEL", event).toString());
    }

    boolean result = false;
    int first = level2.toInt();
    int second = level.toInt();

    if ("<".equals(inequalitySymbol)) {
      result = first < second;
    } else if (">".equals(inequalitySymbol)) {
View Full Code Here


      new Comparator() {
        public int compare(Object o1, Object o2) {
          Level p1 = (Level) o1;
          Level p2 = (Level) o2;

          if (p1.toInt() == p2.toInt()) {
            return 0;
          } else if (p1.toInt() < p2.toInt()) {
            return -1;
          }
View Full Code Here

          Level p1 = (Level) o1;
          Level p2 = (Level) o2;

          if (p1.toInt() == p2.toInt()) {
            return 0;
          } else if (p1.toInt() < p2.toInt()) {
            return -1;
          }

          return 1;
        }
View Full Code Here

        }

        Level level = event.getLevel();
        int severity = IStatus.OK;

        if (level.toInt() >= Priority.ERROR_INT) {
            severity = IStatus.ERROR;
        } else if (level.toInt() >= Priority.WARN_INT) {
            severity = IStatus.WARNING;
        } else if (level.toInt() >= Priority.DEBUG_INT) {
            severity = IStatus.INFO;
View Full Code Here

        Level level = event.getLevel();
        int severity = IStatus.OK;

        if (level.toInt() >= Priority.ERROR_INT) {
            severity = IStatus.ERROR;
        } else if (level.toInt() >= Priority.WARN_INT) {
            severity = IStatus.WARNING;
        } else if (level.toInt() >= Priority.DEBUG_INT) {
            severity = IStatus.INFO;
        }
View Full Code Here

        if (level.toInt() >= Priority.ERROR_INT) {
            severity = IStatus.ERROR;
        } else if (level.toInt() >= Priority.WARN_INT) {
            severity = IStatus.WARNING;
        } else if (level.toInt() >= Priority.DEBUG_INT) {
            severity = IStatus.INFO;
        }

        if (fVerbose || !(severity == IStatus.INFO)) {
            fPluginLog.log(new Status(severity, fPluginLog.getBundle().getSymbolicName(), level.toInt(), text, thrown));
View Full Code Here

        } else if (level.toInt() >= Priority.DEBUG_INT) {
            severity = IStatus.INFO;
        }

        if (fVerbose || !(severity == IStatus.INFO)) {
            fPluginLog.log(new Status(severity, fPluginLog.getBundle().getSymbolicName(), level.toInt(), text, thrown));
        }
    }

    /**
     * Closes this appender.
View Full Code Here

            if (level == null) {
                return;
            }
        }

        switch (level.toInt()) {
          case Level.FATAL_INT:
            setLevel(sigar, LOG_FATAL);
            break;
          case Level.ERROR_INT:
            setLevel(sigar, LOG_ERROR);
View Full Code Here

            if (level == null) {
                return;
            }
        }

        switch (level.toInt()) {
          case Level.FATAL_INT:
            setLevel(sigar, LOG_FATAL);
            break;
          case Level.ERROR_INT:
            setLevel(sigar, LOG_ERROR);
View Full Code Here

        }

        /** {@inheritDoc} */
        public boolean evaluate(final LoggingEvent event, Map matches) {
            Level eventLevel = event.getLevel();
            boolean result = (eventLevel.toInt() < newLevelInt);
            if (result && matches != null) {
                Set entries = (Set) matches.get(LoggingEventFieldResolver.LEVEL_FIELD);
                if (entries == null) {
                    entries = new HashSet();
                    matches.put(LoggingEventFieldResolver.LEVEL_FIELD, entries);
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.