GoogleLogger extends AbstractLogger<GoogleLogger.Api> { @Deprecated public static GoogleLogger forInjectedClassName(String className) { checkArgument(!className.isEmpty(), "injected class name is empty"); return new GoogleLogger(Platform.getBackend(className.replace('/', '.'))); } GoogleLogger(LoggerBackend loggerBackend); static GoogleLogger forEnclosingClass(); @Deprecated static GoogleLogger forInjectedClassName(String className); @Override Api at(Level level);  }
@Test public void testInjectedClassName() { @SuppressWarnings("deprecation") GoogleLogger logger = GoogleLogger.forInjectedClassName("foo/bar/Baz"); assertThat(logger.getBackend().getLoggerName()).isEqualTo("foo.bar.Baz"); }
@Test public void testInjectedInnerClassName() { @SuppressWarnings("deprecation") GoogleLogger logger = GoogleLogger.forInjectedClassName("java/util/Map$Entry"); assertThat(logger.getBackend().getLoggerName()).isEqualTo("java.util.Map.Entry"); }