Java slf4j Logger isSlf4jPresent()

Here you can find the source of isSlf4jPresent()

Description

is Slfj Present

License

Apache License

Declaration

static boolean isSlf4jPresent() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    static boolean isSlf4jPresent() {
        return isClassPresent("org.slf4j.Logger");
    }//  w  w  w .  j  a  v a2  s  .  co m

    private static boolean isClassPresent(String className) {
        try {
            Class.forName(className);
            return true;
        } catch (ClassNotFoundException e) {
            return false;
        }
    }
}

Related

  1. info(String format, Object... arguments)
  2. infoLogging(Logger log, String logMessage, Object[] obj)
  3. infoTimeTaken(final Logger log, final long startTime, final long numItems, final String message, final Object... args)
  4. interruptCurrentThreadWithLog(Logger logger)
  5. isLoggable(final Logger logger, final Level level)
  6. log(Logger logger, int logLevel, String value)
  7. log(Logger logger, Throwable t)
  8. log(String format, Object... arguments)
  9. log(String message)