0

I edited my log4j2.xml to include these lines:

<Logger name="org.apache.http.wire" level="DEBUG">
    <AppenderRef ref="serverlog"/>
</Logger>

Now in my defined serverlog I see the http wire traffic I am after. However there is one problem. For POST requests I can only see request/response HTTP headers. I cannot see the POST data payload.

Is there a way to get this logged too?

Aditya K
  • 173
  • 2
  • 9
  • May need to write [custom filter](https://stackoverflow.com/questions/1528628/logging-payload-of-posts-to-tomcat) or [Spring filter](https://www.baeldung.com/spring-http-logging) – LMC Mar 09 '23 at 15:02
  • Are you trying to log POST request bodies being received *by your server*, or being sent to e.g. remote services *by your application*? – Christopher Schultz Mar 30 '23 at 17:36

0 Answers0