Logging Request/Response size in access_log of Nginx
-
14-04-2021 - |
Вопрос
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.
Решение
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.
Не связан с StackOverflow