ConsoleWriter extends AbstractFormatPatternWriter { @Override public Collection<LogEntryValue> getRequiredLogEntryValues() { Collection<LogEntryValue> logEntryValues = super.getRequiredLogEntryValues(); logEntryValues.add(LogEntryValue.LEVEL); return logEntryValues; } ConsoleWriter();  ConsoleWriter(final Map<String, String> properties); @Override Collection<LogEntryValue> getRequiredLogEntryValues(); @Override void write(final LogEntry logEntry); @Override void flush(); @Override void close();  }
@Test public void requiredLogEntryValues() { ConsoleWriter writer = new ConsoleWriter(singletonMap("format", "{message}")); assertThat(writer.getRequiredLogEntryValues()).containsOnly(LogEntryValue.LEVEL, LogEntryValue.MESSAGE, LogEntryValue.EXCEPTION); }