DefaultHttpLogWriter implements HttpLogWriter { @Override public void write(final Precorrelation precorrelation, final String request) { log.trace(request); }  @Override boolean isActive(); @Override void write(final Precorrelation precorrelation, final String request); @Override void write(final Correlation correlation, final String response);  }
@Test void shouldUseTraceLevelForLoggingRequests() throws IOException { final HttpLogWriter unit = new DefaultHttpLogWriter(); logger.setEnabledLevels(TRACE); unit.write(new SimplePrecorrelation("", Clock.systemUTC()), "foo"); final LoggingEvent event = getOnlyElement(logger.getLoggingEvents()); assertEquals(TRACE, event.getLevel()); assertEquals("foo", event.getMessage()); }
@Test void shouldDefaultToTraceLevelForLoggingResponses() throws IOException { final HttpLogWriter unit = new DefaultHttpLogWriter(); logger.setEnabledLevels(TRACE); unit.write(new SimpleCorrelation("1", MIN, MIN), "bar"); final LoggingEvent event = getOnlyElement(logger.getLoggingEvents()); assertEquals(TRACE, event.getLevel()); assertEquals("bar", event.getMessage()); }