2

I need to log request/response size(body+headers) in the access_log. Any idea how to do it in nginx? In apache we can do it using %I..%O format.

RJ.
  • 332
  • 5
  • 16

1 Answers1

2
log_format combined '$request_length $bytes_sent';

According to docs $request_length includes the length of request headers and $bytes_sent is a total bytes sent to the client in response to the mentioned request.

actual
  • 2,370
  • 1
  • 21
  • 32