@Test public void testTrace() { final LogContext ctx = Mockito.mock(LogContext.class); when(ctx.trace()).thenReturn("test-trace"); String result = new SimpleTextFormat("[${trace}]").format(ctx); Assertions.assertThat(result).isEqualTo("[test-trace]"); }
@Override public String format(@Nonnull final LogContext log) { final StringBuilder builder = new StringBuilder(); for (final Token token : tokens) { token.append(log, builder); } return builder.toString(); }
SimpleTextFormat implements Format { @Override public String format(@Nonnull final LogContext log) { final StringBuilder builder = new StringBuilder(); for (final Token token : tokens) { token.append(log, builder); } return builder.toString(); } }
SimpleTextFormat implements Format { @Override public String format(@Nonnull final LogContext log) { final StringBuilder builder = new StringBuilder(); for (final Token token : tokens) { token.append(log, builder); } return builder.toString(); } SimpleTextFormat(@Nonnull final String format);  SimpleTextFormat(@Nonnull final String format, @Nonnull final Pattern variablePattern); }
SimpleTextFormat implements Format { @Override public String format(@Nonnull final LogContext log) { final StringBuilder builder = new StringBuilder(); for (final Token token : tokens) { token.append(log, builder); } return builder.toString(); } SimpleTextFormat(@Nonnull final String format);  SimpleTextFormat(@Nonnull final String format, @Nonnull final Pattern variablePattern); @Override String format(@Nonnull final LogContext log); @Override String toString(); }
SimpleTextFormat implements Format { @Override public String format(@Nonnull final LogContext log) { final StringBuilder builder = new StringBuilder(); for (final Token token : tokens) { token.append(log, builder); } return builder.toString(); } SimpleTextFormat(@Nonnull final String format);  SimpleTextFormat(@Nonnull final String format, @Nonnull final Pattern variablePattern); @Override String format(@Nonnull final LogContext log); @Override String toString();  }