    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 *
    011 * @author ceki
    012 * @since 1.7.15
    013 */
    014public enum Level {
    015
    016    ERROR(ERROR_INT, "ERROR"), WARN(WARN_INT, "WARN"), INFO(INFO_INT, "INFO"), DEBUG(DEBUG_INT, "DEBUG"), TRACE(TRACE_INT, "TRACE");
    017
    018    private int levelInt;
    019    private String levelStr;
    020
    021    Level(int i, String s) {
    022        levelInt = i;
    023        levelStr = s;
    024    }
    025
    026    public int toInt() {
    027        return levelInt;
    028    }
    029
    030    /**
    031     * Returns the string representation of this Level.
    032     */
    033    public String toString() {
    034        return levelStr;
    035    }
    036
    037}