Java slf4j Logger getTraceLevel(Logger logger)

Here you can find the source of getTraceLevel(Logger logger)

Description

get Trace Level

License

Open Source License

Declaration

public static int getTraceLevel(Logger logger) 

Method Source Code

//package com.java2s;

import org.slf4j.Logger;

public class Main {
    /**//www.  j av a 2s  .co m
     * 
     */
    public final static int TRACE_DEBUG = 0;
    public final static int TRACE_INFO = 1;
    public final static int TRACE_WARN = 2;
    public final static int TRACE_ERROR = 3;

    public static int getTraceLevel(Logger logger) {
        if (logger.isDebugEnabled()) {
            return TRACE_DEBUG;
        } else if (logger.isInfoEnabled()) {
            return TRACE_INFO;
        } else if (logger.isWarnEnabled()) {
            return TRACE_WARN;
        } else {
            return TRACE_ERROR;
        }
    }
}

Related

  1. getLoggerForCurrentClass()
  2. getLoggerInstance(String callerCLass)
  3. getLoggerLevel(Logger logger)
  4. getLong(Properties config, String key, long defaultValue)
  5. getMessage(String message, Object... args)
  6. ic static void i(String fmt, Object... args)
  7. info(Class clz, String logStr)
  8. info(final Logger log, final String message, final Object... args)
  9. info(final Logger logger, final String message)