Package org.apache.log4j

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


        }

        /** {@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


        }

        /** {@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

        }

        /** {@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

     */
    public boolean evaluate(final LoggingEvent event, Map matches) {
        //both util.logging and log4j contain 'info' - use the int values instead of equality
        //info level set to the same value for both levels
        Level eventLevel = event.getLevel();
        boolean result = (level.toInt() == eventLevel.toInt());
        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

     */
    public boolean evaluate(final LoggingEvent event, Map matches) {
        //both util.logging and log4j contain 'info' - use the int values instead of equality
        //info level set to the same value for both levels
        Level eventLevel = event.getLevel();
        boolean result = level.toInt() != eventLevel.toInt();
        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

            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

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.