Here you can find the source of getLogger(Class clazz)
public static Logger getLogger(Class clazz)
//package com.java2s; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Hashtable; public class Main { private static Hashtable<Class, Logger> loggerCache = new Hashtable<>(); public static Logger getLogger(Class clazz) { // Class clazz = objInstance.getClass(); Logger ret = loggerCache.get(clazz); if (ret == null) { ret = LoggerFactory.getLogger(clazz); loggerCache.put(clazz, ret); }/*from w w w . jav a 2 s . com*/ return ret; } }