Want request and response body to be logged in access logs of traefik proxy

I want the request and response body to be logged along with the headers passed in access logs of traefik proxy as I want to test it e2e. Can someone please guide me to the correct documentation or way to do it?

172.24.0.1 - - [28/Sep/2023:05:42:44 +0000] "GET /demo-get HTTP/1.1" 200 48 "-" "-" 7 "your-actual-service-image-get@file" "http://your-actual-service-image:8081" 22ms

It seems this is not supported by Traefik (issue).

If you want to do "real" end-2-end tests, then you would need to check it on client side anyway :slightly_smiling_face:

What Gateway controller implementation would you recommend if I have to log the request/response body.

Not sure what a "gateway controller" is.

There are many contributed Traefik plugins available (link), but none seem to log request and response body.

But, as there are body filter plugins available, it seems the middleware has access to request and response body, so you could implement your own logger with a Traefik plugin using go-lang. (Doc)