@Test public void renderNeitherMessageNorException() { MessageAndExceptionToken token = new MessageAndExceptionToken(Collections.emptyList()); assertThat(render(token, null, null)).isEmpty(); }
@Override public void render(final LogEntry logEntry, final StringBuilder builder) { messageToken.render(logEntry, builder); if (logEntry.getException() != null) { if (logEntry.getMessage() != null) { builder.append(": "); } exceptionToken.render(logEntry, builder); } }
MessageAndExceptionToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { messageToken.render(logEntry, builder); if (logEntry.getException() != null) { if (logEntry.getMessage() != null) { builder.append(": "); } exceptionToken.render(logEntry, builder); } } }
MessageAndExceptionToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { messageToken.render(logEntry, builder); if (logEntry.getException() != null) { if (logEntry.getMessage() != null) { builder.append(": "); } exceptionToken.render(logEntry, builder); } } MessageAndExceptionToken(final List<ThrowableFilter> filters); }
MessageAndExceptionToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { messageToken.render(logEntry, builder); if (logEntry.getException() != null) { if (logEntry.getMessage() != null) { builder.append(": "); } exceptionToken.render(logEntry, builder); } } MessageAndExceptionToken(final List<ThrowableFilter> filters); @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); }
MessageAndExceptionToken implements Token { @Override public void render(final LogEntry logEntry, final StringBuilder builder) { messageToken.render(logEntry, builder); if (logEntry.getException() != null) { if (logEntry.getMessage() != null) { builder.append(": "); } exceptionToken.render(logEntry, builder); } } MessageAndExceptionToken(final List<ThrowableFilter> filters); @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);  }