Response Logging
Learn Response Logging (Logging & Monitoring, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Fresher Notes Response logging records the status code, selected headers, body size and optionally the body that the application sent back to the client. Why wrapping : the response body is written straight to the output stream, so you wrap it in ContentCachingResponseWrapper to keep a copy. Key call : after logging, you must call copyBodyToResponse() , otherwise the client receives an empty body.