$ 0 0 I've found it: http://nginx.org/en/docs/http/ngx_http_log_module.html ($connection variable contains necessary value).