Mercurial > hg > nginx
diff src/http/ngx_http_log_handler.c @ 178:a8ff48d26cca
nginx-0.0.1-2003-11-11-00:09:22 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 10 Nov 2003 21:09:22 +0000 |
parents | 4db54fdbcbe7 |
children | 8dee38ea9117 |
line wrap: on
line diff
--- 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_ 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_ 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_ht 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); }