### Question:
LogFactory { public static Log getLog(Class<?> aClass) { return getLog(aClass.getName()); } private  LogFactory(); static Log getLog(Class<?> aClass); static Log getLog(String logger); static synchronized void useCustomLogging(Class<? extends Log> clazz); static synchronized void useSlf4jLogging(); static synchronized void useCommonsLogging(); static synchronized void useLog4JLogging(); static synchronized void useLog4J2Logging(); static synchronized void useJdkLogging(); static synchronized void useStdOutLogging(); static synchronized void useNoLogging(); static final String MARKER; }### Answer:
@Test public void shouldReadLogImplFromSettings() throws Exception { try (Reader reader = Resources.getResourceAsReader("org/apache/ibatis/logging/mybatis-config.xml")) { new SqlSessionFactoryBuilder().build(reader); } Log log = LogFactory.getLog(Object.class); log.debug("Debug message."); assertEquals(log.getClass().getName(), NoLoggingImpl.class.getName()); }
@Test void shouldReadLogImplFromSettings() throws Exception { try (Reader reader = Resources.getResourceAsReader("org/apache/ibatis/logging/mybatis-config.xml")) { new SqlSessionFactoryBuilder().build(reader); } Log log = LogFactory.getLog(Object.class); log.debug("Debug message."); assertEquals(log.getClass().getName(), NoLoggingImpl.class.getName()); }
@Test public void shouldReadLogImplFromSettings() throws Exception { Reader reader = Resources.getResourceAsReader("org/apache/ibatis/logging/mybatis-config.xml"); new SqlSessionFactoryBuilder().build(reader); reader.close(); Log log = LogFactory.getLog(Object.class); log.debug("Debug message."); assertEquals(log.getClass().getName(), NoLoggingImpl.class.getName()); }