diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-10-21 15:34:30 +0000 |
---|---|---|
committer | Jonathan Kolb <jon@b0g.us> | 2004-10-21 15:34:30 +0000 |
commit | a3b9eb91d36557964697d6a22ac0ab61d95421cf (patch) | |
tree | 102505101c381336762abf20bbaf7daebb1dfff9 /src/http/ngx_http_log_handler.c | |
parent | 8af4bc75fbf2d48f69956c8dc888be2792030c6f (diff) | |
download | nginx-a3b9eb91d36557964697d6a22ac0ab61d95421cf.tar.gz |
Changes with nginx 0.1.2 21 Oct 2004v0.1.2
*) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS
options in configure.
*) Feature: the server_name directive supports *.domain.tld.
*) Bugfix: the portability improvements.
*) Bugfix: if configuration file was set in command line, the
reconfiguration was impossible, bug appeared in 0.1.1.
*) Bugfix: proxy module may get caught in an endless loop when sendfile
is not used.
*) Bugfix: with sendfile the response was not recoded according to the
charset module directives, bug appeared in 0.1.1.
*) Bugfix: very seldom bug in the kqueue processing.
*) Bugfix: the gzip module compressed the proxied responses that was
already compressed.
Diffstat (limited to 'src/http/ngx_http_log_handler.c')
-rw-r--r-- | src/http/ngx_http_log_handler.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/http/ngx_http_log_handler.c b/src/http/ngx_http_log_handler.c index 51166cf0c..9a1389d13 100644 --- a/src/http/ngx_http_log_handler.c +++ b/src/http/ngx_http_log_handler.c @@ -210,9 +210,13 @@ static u_char *ngx_http_log_addr(ngx_http_request_t *r, u_char *buf, static u_char *ngx_http_log_connection(ngx_http_request_t *r, u_char *buf, uintptr_t data) { + return ngx_sprintf(buf, "%ui", r->connection->number); + +#if 0 return buf + ngx_snprintf((char *) buf, NGX_INT_T_LEN + 1, "%" NGX_UINT_T_FMT, r->connection->number); +#endif } @@ -244,8 +248,12 @@ static u_char *ngx_http_log_msec(ngx_http_request_t *r, u_char *buf, ngx_gettimeofday(&tv); + return ngx_sprintf(buf, "%l.%03l", tv.tv_sec, tv.tv_usec / 1000); + +#if 0 return buf + ngx_snprintf((char *) buf, TIME_T_LEN + 5, "%ld.%03ld", tv.tv_sec, tv.tv_usec / 1000); +#endif } @@ -264,24 +272,36 @@ static u_char *ngx_http_log_request(ngx_http_request_t *r, u_char *buf, static u_char *ngx_http_log_status(ngx_http_request_t *r, u_char *buf, uintptr_t data) { + return ngx_sprintf(buf, "%ui", + r->err_status ? r->err_status : r->headers_out.status); + +#if 0 return buf + ngx_snprintf((char *) buf, 4, "%" NGX_UINT_T_FMT, r->err_status ? r->err_status : r->headers_out.status); +#endif } static u_char *ngx_http_log_length(ngx_http_request_t *r, u_char *buf, uintptr_t data) { + return ngx_sprintf(buf, "%O", r->connection->sent); + +#if 0 return buf + ngx_snprintf((char *) buf, NGX_OFF_T_LEN + 1, OFF_T_FMT, r->connection->sent); +#endif } static u_char *ngx_http_log_apache_length(ngx_http_request_t *r, u_char *buf, uintptr_t data) { + return ngx_sprintf(buf, "%O", r->connection->sent - r->header_size); +#if 0 return buf + ngx_snprintf((char *) buf, NGX_OFF_T_LEN + 1, OFF_T_FMT, r->connection->sent - r->header_size); +#endif } @@ -467,8 +487,7 @@ static u_char *ngx_http_log_header_out(ngx_http_request_t *r, u_char *buf, return (u_char *) sizeof("Mon, 28 Sep 1970 06:00:00 GMT") - 1; } - return buf + ngx_http_time(buf, - r->headers_out.last_modified_time); + return ngx_http_time(buf, r->headers_out.last_modified_time); } if (buf) { |