@Test public void error() { ConsoleWriter writer = new ConsoleWriter(singletonMap("format", "{message}")); writer.write(LogEntryBuilder.empty().level(Level.ERROR).message("Hello World!").create()); assertThat(systemStream.consumeErrorOutput()).contains("Hello World!" + NEW_LINE); }
@Override public void write(final LogEntry logEntry) { if (logEntry.getLevel().ordinal() < errorLevel.ordinal()) { System.out.print(render(logEntry)); } else { System.err.print(render(logEntry)); } }
ConsoleWriter extends AbstractFormatPatternWriter { @Override public void write(final LogEntry logEntry) { if (logEntry.getLevel().ordinal() < errorLevel.ordinal()) { System.out.print(render(logEntry)); } else { System.err.print(render(logEntry)); } } }
ConsoleWriter extends AbstractFormatPatternWriter { @Override public void write(final LogEntry logEntry) { if (logEntry.getLevel().ordinal() < errorLevel.ordinal()) { System.out.print(render(logEntry)); } else { System.err.print(render(logEntry)); } } ConsoleWriter();  ConsoleWriter(final Map<String, String> properties); }
ConsoleWriter extends AbstractFormatPatternWriter { @Override public void write(final LogEntry logEntry) { if (logEntry.getLevel().ordinal() < errorLevel.ordinal()) { System.out.print(render(logEntry)); } else { System.err.print(render(logEntry)); } } ConsoleWriter();  ConsoleWriter(final Map<String, String> properties); @Override Collection<LogEntryValue> getRequiredLogEntryValues(); @Override void write(final LogEntry logEntry); @Override void flush(); @Override void close(); }
ConsoleWriter extends AbstractFormatPatternWriter { @Override public void write(final LogEntry logEntry) { if (logEntry.getLevel().ordinal() < errorLevel.ordinal()) { System.out.print(render(logEntry)); } else { System.err.print(render(logEntry)); } } ConsoleWriter();  ConsoleWriter(final Map<String, String> properties); @Override Collection<LogEntryValue> getRequiredLogEntryValues(); @Override void write(final LogEntry logEntry); @Override void flush(); @Override void close();  }