Here you can find the source of isSlf4jPresent()
static boolean isSlf4jPresent()
//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; } } }