FluentLogger extends AbstractLogger<FluentLogger.Api> { public static FluentLogger forEnclosingClass() { String loggingClass = Platform.getCallerFinder().findLoggingClass(FluentLogger.class); return new FluentLogger(Platform.getBackend(loggingClass)); } FluentLogger(LoggerBackend backend); static FluentLogger forEnclosingClass(); @Override Api at(Level level);  }
@Test public void testCreate() { FluentLogger logger = FluentLogger.forEnclosingClass(); assertThat(logger.getName()).isEqualTo(FluentLoggerTest.class.getName()); assertThat(logger.getBackend().getLoggerName()).isEqualTo(FluentLoggerTest.class.getName()); }