diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-11-10 21:09:22 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-11-10 21:09:22 +0000 |
commit | d59a047a7070dc6af13b2e35c097efccc8ce38d0 (patch) | |
tree | 7efbd7a8fd2e4d871da3165dab7287c49fb0341e /src/http/ngx_http_log_handler.c | |
parent | 7832933eed3cb0187eca4fba87076f10c897925e (diff) | |
download | nginx-d59a047a7070dc6af13b2e35c097efccc8ce38d0.tar.gz nginx-d59a047a7070dc6af13b2e35c097efccc8ce38d0.zip |
nginx-0.0.1-2003-11-11-00:09:22 import
Diffstat (limited to 'src/http/ngx_http_log_handler.c')
-rw-r--r-- | src/http/ngx_http_log_handler.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/http/ngx_http_log_handler.c b/src/http/ngx_http_log_handler.c index 7a2bf9e9c..9d4f65e9a 100644 --- a/src/http/ngx_http_log_handler.c +++ b/src/http/ngx_http_log_handler.c @@ -210,6 +210,10 @@ static char *ngx_http_log_pipe(ngx_http_request_t *r, char *buf, uintptr_t data) static char *ngx_http_log_time(ngx_http_request_t *r, char *buf, uintptr_t data) { + return ngx_cpymem(buf, ngx_cached_http_log_time.data, + ngx_cached_http_log_time.len); + +#if 0 ngx_tm_t tm; ngx_localtime(&tm); @@ -219,6 +223,7 @@ static char *ngx_http_log_time(ngx_http_request_t *r, char *buf, uintptr_t data) tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1], tm.ngx_tm_year, tm.ngx_tm_hour, tm.ngx_tm_min, tm.ngx_tm_sec); +#endif } @@ -237,7 +242,8 @@ static char *ngx_http_log_request(ngx_http_request_t *r, char *buf, static char *ngx_http_log_status(ngx_http_request_t *r, char *buf, uintptr_t data) { - return buf + ngx_snprintf(buf, 4, "%d", r->headers_out.status); + return buf + ngx_snprintf(buf, 4, "%d", + r->err_status ? r->err_status : r->headers_out.status); } |