@Test public void renderTextMessage() { MessageToken token = new MessageToken(); assertThat(render(token, "Hello World!")).isEqualTo("Hello World!"); }
@Override public void render(final LogEntry logEntry, final StringBuilder builder) { String message = logEntry.getMessage(); if (message != null) { builder.append(NEW_LINE_PATTERN.matcher(message).replaceAll(NEW_LINE)); } }
MessageToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { String message = logEntry.getMessage(); if (message != null) { builder.append(NEW_LINE_PATTERN.matcher(message).replaceAll(NEW_LINE)); } } }
MessageToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { String message = logEntry.getMessage(); if (message != null) { builder.append(NEW_LINE_PATTERN.matcher(message).replaceAll(NEW_LINE)); } } MessageToken(); }
MessageToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { String message = logEntry.getMessage(); if (message != null) { builder.append(NEW_LINE_PATTERN.matcher(message).replaceAll(NEW_LINE)); } } MessageToken(); @Override Collection<LogEntryValue> getRequiredLogEntryValues(); @Override void render(final LogEntry logEntry, final StringBuilder builder); @Override void apply(final LogEntry logEntry, final PreparedStatement statement, final int index); }
MessageToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { String message = logEntry.getMessage(); if (message != null) { builder.append(NEW_LINE_PATTERN.matcher(message).replaceAll(NEW_LINE)); } } MessageToken(); @Override Collection<LogEntryValue> getRequiredLogEntryValues(); @Override void render(final LogEntry logEntry, final StringBuilder builder); @Override void apply(final LogEntry logEntry, final PreparedStatement statement, final int index);  }