@Test public void shouldLogDebugMessageGivenSupplier() { when(innerLogger.isDebugEnabled()).thenReturn(true); logger.debug(msgSupplier); verify(msgSupplier, times(1)).get(); verify(innerLogger, times(1)).debug(eq(LOG_MSG), captor.capture()); assertThat(captor.getValue().getMessage(), is(msg)); }
public void debug(final Supplier<SchemaAndValue> msgSupplier) { if (!inner.isDebugEnabled()) { return; } debug(msgSupplier.get()); }
StructuredLoggerImpl implements StructuredLogger { public void debug(final Supplier<SchemaAndValue> msgSupplier) { if (!inner.isDebugEnabled()) { return; } debug(msgSupplier.get()); } }
StructuredLoggerImpl implements StructuredLogger { public void debug(final Supplier<SchemaAndValue> msgSupplier) { if (!inner.isDebugEnabled()) { return; } debug(msgSupplier.get()); } StructuredLoggerImpl(final Logger inner); }
StructuredLoggerImpl implements StructuredLogger { public void debug(final Supplier<SchemaAndValue> msgSupplier) { if (!inner.isDebugEnabled()) { return; } debug(msgSupplier.get()); } StructuredLoggerImpl(final Logger inner); String getName(); void error(final Supplier<SchemaAndValue> msgSupplier); void error(final SchemaAndValue msg); void info(final Supplier<SchemaAndValue> msgSupplier); void info(final SchemaAndValue msg); void debug(final Supplier<SchemaAndValue> msgSupplier); void debug(final SchemaAndValue msg); }
StructuredLoggerImpl implements StructuredLogger { public void debug(final Supplier<SchemaAndValue> msgSupplier) { if (!inner.isDebugEnabled()) { return; } debug(msgSupplier.get()); } StructuredLoggerImpl(final Logger inner); String getName(); void error(final Supplier<SchemaAndValue> msgSupplier); void error(final SchemaAndValue msg); void info(final Supplier<SchemaAndValue> msgSupplier); void info(final SchemaAndValue msg); void debug(final Supplier<SchemaAndValue> msgSupplier); void debug(final SchemaAndValue msg);  }