Dump HTTP requests in WildFly 8

前端 未结 3 1408
死守一世寂寞
死守一世寂寞 2020-12-05 10:20

To debug HTTP requests during development, I would like my WildFly 8 application server to dump HTTP requests, including request method and headers, to a log file

3条回答
  •  青春惊慌失措
    2020-12-05 11:07

    There are a number of people asking how to get the entire HTTP body logged out, not just the headers.

    It seems an answer exists: https://8bitplatoon.blogspot.com/2017/02/dumping-http-requests-and-responses-in.html

    In short, if that link doesn't survive, a simple addition to your standalone.xml will do the trick:

    I added this after the ... and before ..., restarted wildfly, and was able to get complete HTTP bodies in my server logs (server.log in my case).

    This does not interact with or depend on the Undertow "request dumper" at all as far as I can tell, you can do one, the other, or both.

提交回复
热议问题