package logdemo; import org.slf4j.*; public class LogTest { public static Logger getLogger() { return LoggerFactory.getLogger(LogTest.class); } public static Logger getLogger(String name) { return LoggerFactory.getLogger(name); } public static void testLoggerUsage() { getLogger().info("feinen is boy."); getLogger().info("feinen is {}.", 20); getLogger().info("object is {}."); Object obj = null; getLogger().info("object is {}.", obj); } public static void testInheritance() { getLogger("com.webank").info("inheritance info"); getLogger("com.webank.it").debug("inheritance debug"); } public static void main(String[] args) { for (int count = 0; count < 200000; count++) { testLoggerUsage(); testInheritance(); } } }