@Test public void shouldCreateLoggerCorrectly() { when(innerFactory.apply("prefix.foo")).thenReturn(innerLogger); final StructuredLogger logger = loggerFactory.getLogger("foo"); logger.info(mock(SchemaAndValue.class)); verify(innerFactory, times(1)).apply("prefix.foo"); verify(innerLogger).info(any(String.class), any(SerializableSchemaAndValue.class)); }
public StructuredLogger getLogger(final Class<?> clazz) { return getLogger(clazz.getName()); }
StructuredLoggerFactory { public StructuredLogger getLogger(final Class<?> clazz) { return getLogger(clazz.getName()); } }
StructuredLoggerFactory { public StructuredLogger getLogger(final Class<?> clazz) { return getLogger(clazz.getName()); } StructuredLoggerFactory(final String prefix);   StructuredLoggerFactory(final String prefix, final Function<String, Logger> inner); }
StructuredLoggerFactory { public StructuredLogger getLogger(final Class<?> clazz) { return getLogger(clazz.getName()); } StructuredLoggerFactory(final String prefix);   StructuredLoggerFactory(final String prefix, final Function<String, Logger> inner); StructuredLogger getLogger(final Class<?> clazz); StructuredLogger getLogger(final String name); Collection<String> getLoggers(); }
StructuredLoggerFactory { public StructuredLogger getLogger(final Class<?> clazz) { return getLogger(clazz.getName()); } StructuredLoggerFactory(final String prefix);   StructuredLoggerFactory(final String prefix, final Function<String, Logger> inner); StructuredLogger getLogger(final Class<?> clazz); StructuredLogger getLogger(final String name); Collection<String> getLoggers();  }