001package org.slf4j.event;
002
003import static org.slf4j.event.EventConstants.DEBUG_INT;
004import static org.slf4j.event.EventConstants.ERROR_INT;
005import static org.slf4j.event.EventConstants.INFO_INT;
006import static org.slf4j.event.EventConstants.TRACE_INT;
007import static org.slf4j.event.EventConstants.WARN_INT;
008
009/**
010 * SLF4J's internal representation of Level.
011 * 
012 * 
013 * @author Ceki Gülcü
014 * @since 1.7.15
015 */
016public enum Level {
017
018    ERROR(ERROR_INT, "ERROR"), WARN(WARN_INT, "WARN"), INFO(INFO_INT, "INFO"), DEBUG(DEBUG_INT, "DEBUG"), TRACE(TRACE_INT, "TRACE");
019
020    private int levelInt;
021    private String levelStr;
022
023    Level(int i, String s) {
024        levelInt = i;
025        levelStr = s;
026    }
027
028    public int toInt() {
029        return levelInt;
030    }
031
032    /**
033     * Returns the string representation of this Level.
034     */
035    public String toString() {
036        return levelStr;
037    }
038
039}