LoggerFactory { public static Logger getLogger(Class<?> key) { FailsafeLogger logger = LOGGERS.get(key.getName()); if (logger == null) { LOGGERS.putIfAbsent(key.getName(), new FailsafeLogger(LOGGER_ADAPTER.getLogger(key))); logger = LOGGERS.get(key.getName()); } return logger; } private  LoggerFactory(); static void setLoggerAdapter(String loggerAdapter); static void setLoggerAdapter(LoggerAdapter loggerAdapter); static Logger getLogger(Class<?> key); static Logger getLogger(String key); static Level getLevel(); static void setLevel(Level level); static File getFile();  }
@Test public void testGetLogger() { Logger logger1 = LoggerFactory.getLogger(this.getClass()); Logger logger2 = LoggerFactory.getLogger(this.getClass()); assertThat(logger1, is(logger2)); }