comparison src/http/modules/ngx_http_log_module.c @ 668:9fbf3ad94cbf NGINX_1_1_18

nginx 1.1.18 *) Change: keepalive connections are no longer disabled for Safari by default. *) Feature: the $connection_requests variable. *) Feature: $tcpinfo_rtt, $tcpinfo_rttvar, $tcpinfo_snd_cwnd and $tcpinfo_rcv_space variables. *) Feature: the "worker_cpu_affinity" directive now works on FreeBSD. *) Feature: the "xslt_param" and "xslt_string_param" directives. Thanks to Samuel Behan. *) Bugfix: in configure tests. Thanks to Piotr Sikora. *) Bugfix: in the ngx_http_xslt_filter_module. *) Bugfix: nginx could not be built on Debian GNU/Hurd.
author Igor Sysoev <http://sysoev.ru>
date Wed, 28 Mar 2012 00:00:00 +0400
parents f5b859b2f097
children bfa81a0490a2
comparison
equal deleted inserted replaced
667:e0eabdb2bad1 668:9fbf3ad94cbf
78 static ssize_t ngx_http_log_script_write(ngx_http_request_t *r, 78 static ssize_t ngx_http_log_script_write(ngx_http_request_t *r,
79 ngx_http_log_script_t *script, u_char **name, u_char *buf, size_t len); 79 ngx_http_log_script_t *script, u_char **name, u_char *buf, size_t len);
80 80
81 static u_char *ngx_http_log_connection(ngx_http_request_t *r, u_char *buf, 81 static u_char *ngx_http_log_connection(ngx_http_request_t *r, u_char *buf,
82 ngx_http_log_op_t *op); 82 ngx_http_log_op_t *op);
83 static u_char *ngx_http_log_connection_requests(ngx_http_request_t *r,
84 u_char *buf, ngx_http_log_op_t *op);
83 static u_char *ngx_http_log_pipe(ngx_http_request_t *r, u_char *buf, 85 static u_char *ngx_http_log_pipe(ngx_http_request_t *r, u_char *buf,
84 ngx_http_log_op_t *op); 86 ngx_http_log_op_t *op);
85 static u_char *ngx_http_log_time(ngx_http_request_t *r, u_char *buf, 87 static u_char *ngx_http_log_time(ngx_http_request_t *r, u_char *buf,
86 ngx_http_log_op_t *op); 88 ngx_http_log_op_t *op);
87 static u_char *ngx_http_log_iso8601(ngx_http_request_t *r, u_char *buf, 89 static u_char *ngx_http_log_iso8601(ngx_http_request_t *r, u_char *buf,
191 "\"$http_referer\" \"$http_user_agent\""); 193 "\"$http_referer\" \"$http_user_agent\"");
192 194
193 195
194 static ngx_http_log_var_t ngx_http_log_vars[] = { 196 static ngx_http_log_var_t ngx_http_log_vars[] = {
195 { ngx_string("connection"), NGX_ATOMIC_T_LEN, ngx_http_log_connection }, 197 { ngx_string("connection"), NGX_ATOMIC_T_LEN, ngx_http_log_connection },
198 { ngx_string("connection_requests"), NGX_INT_T_LEN,
199 ngx_http_log_connection_requests },
196 { ngx_string("pipe"), 1, ngx_http_log_pipe }, 200 { ngx_string("pipe"), 1, ngx_http_log_pipe },
197 { ngx_string("time_local"), sizeof("28/Sep/1970:12:00:00 +0600") - 1, 201 { ngx_string("time_local"), sizeof("28/Sep/1970:12:00:00 +0600") - 1,
198 ngx_http_log_time }, 202 ngx_http_log_time },
199 { ngx_string("time_iso8601"), sizeof("1970-09-28T12:00:00+06:00") - 1, 203 { ngx_string("time_iso8601"), sizeof("1970-09-28T12:00:00+06:00") - 1,
200 ngx_http_log_iso8601 }, 204 ngx_http_log_iso8601 },
499 503
500 static u_char * 504 static u_char *
501 ngx_http_log_connection(ngx_http_request_t *r, u_char *buf, 505 ngx_http_log_connection(ngx_http_request_t *r, u_char *buf,
502 ngx_http_log_op_t *op) 506 ngx_http_log_op_t *op)
503 { 507 {
504 return ngx_sprintf(buf, "%ui", r->connection->number); 508 return ngx_sprintf(buf, "%uA", r->connection->number);
509 }
510
511
512 static u_char *
513 ngx_http_log_connection_requests(ngx_http_request_t *r, u_char *buf,
514 ngx_http_log_op_t *op)
515 {
516 return ngx_sprintf(buf, "%ui", r->connection->requests);
505 } 517 }
506 518
507 519
508 static u_char * 520 static u_char *
509 ngx_http_log_pipe(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op) 521 ngx_http_log_pipe(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op)