ConsoleAppender implements LogAppender { String filterLineSeparator(String value) { if (value == null) return ""; int length = value.length(); var builder = new StringBuilder(length); for (int i = 0; i < length; i++) { char ch = value.charAt(i); if (ch == '\n' || ch == '\r') builder.append(' '); else builder.append(ch); } return builder.toString(); }  @Override void append(ActionLogMessage message); @Override void append(StatMessage message);  }
@Test void filterLineSeparator() { assertThat(appender.filterLineSeparator("line1\nline2")).isEqualTo("line1 line2"); assertThat(appender.filterLineSeparator("line1\r\nline2")).isEqualTo("line1 line2"); }