@Test public void writesRequestLogWithMDCEntries() throws Exception { Map<String, String> mdcAttributes = new HashMap<>(); mdcAttributes.put("this-key", "this-value"); mdcAttributes.put("that-key", "that-value"); when(httpRequest.getAttribute(MDC.class.getName())).thenReturn(mdcAttributes); createLoggerWithoutResponse(httpResponse).logRequest(); assertThat(systemOut.toString(), both(containsString("\"this-key\":\"this-value\"")) .and(containsString("\"that-key\":\"that-value\""))); }
public void logRequest() { requestRecord.stop(); addRequestHandlingParameters(); generateLog(); }
RequestLogger { public void logRequest() { requestRecord.stop(); addRequestHandlingParameters(); generateLog(); } }
RequestLogger { public void logRequest() { requestRecord.stop(); addRequestHandlingParameters(); generateLog(); } RequestLogger(RequestRecord requestRecord, HttpServletRequest httpRequest,
			HttpServletResponse httpResponse); }
RequestLogger { public void logRequest() { requestRecord.stop(); addRequestHandlingParameters(); generateLog(); } RequestLogger(RequestRecord requestRecord, HttpServletRequest httpRequest,
			HttpServletResponse httpResponse); static final boolean isRequestLoggingEnabled(); void logRequest(); }
RequestLogger { public void logRequest() { requestRecord.stop(); addRequestHandlingParameters(); generateLog(); } RequestLogger(RequestRecord requestRecord, HttpServletRequest httpRequest,
			HttpServletResponse httpResponse); static final boolean isRequestLoggingEnabled(); void logRequest();  }