summaryrefslogtreecommitdiffhomepage
path: root/src/http/ngx_http_request.h
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2014-12-02 05:54:54 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2014-12-02 05:54:54 +0300
commit10345663c8d7d011ae186fb22d5fdf9a1912b80d (patch)
treea50705318cf3dffcf9cd703e7e3f9898e22f8326 /src/http/ngx_http_request.h
parent778cc4b42ea85e19a8ebf6c1a42fc636e48ec309 (diff)
downloadnginx-10345663c8d7d011ae186fb22d5fdf9a1912b80d.tar.gz
nginx-10345663c8d7d011ae186fb22d5fdf9a1912b80d.tar.bz2
Upstream: improved subrequest logging.
To ensure proper logging make sure to set current_request in all event handlers, including resolve, ssl handshake, cache lock wait timer and aio read handlers. A macro ngx_http_set_log_request() introduced to simplify this.
Diffstat (limited to '')
-rw-r--r--src/http/ngx_http_request.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_request.h b/src/http/ngx_http_request.h
index f6ea6fb56..cffab9a69 100644
--- a/src/http/ngx_http_request.h
+++ b/src/http/ngx_http_request.h
@@ -595,4 +595,8 @@ extern ngx_http_header_out_t ngx_http_headers_out[];
}
+#define ngx_http_set_log_request(log, r) \
+ ((ngx_http_log_ctx_t *) log->data)->current_request = r
+
+
#endif /* _NGX_HTTP_REQUEST_H_INCLUDED_ */