diff options
| author | Maxim Dounin <mdounin@mdounin.ru> | 2012-11-13 10:45:23 +0000 |
|---|---|---|
| committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-11-13 10:45:23 +0000 |
| commit | 3f72b594126f0b05303fadb5a051de24d2646454 (patch) | |
| tree | 398242fb1055c7b2a6a27ba4e4bd0e2b7443856c /src/http/modules | |
| parent | 71b6604e4465b6aac478f04c3608a6be5c6500e6 (diff) | |
| download | nginx-3f72b594126f0b05303fadb5a051de24d2646454.tar.gz nginx-3f72b594126f0b05303fadb5a051de24d2646454.tar.bz2 | |
Merge of r4886, r4887, r4894: log variables generalization:
*) Log: $apache_bytes_sent removed. It was renamed to $body_bytes_sent
in nginx 0.3.10 and the old name is deprecated since then.
*) Variable $bytes_sent. It replicates variable $bytes_sent as previously
available in log module only. Patch by Benjamin Grössing (with minor
changes).
*) Variables $connection and $connection_requests. Log module
counterparts are removed as they aren't used often and there is no
need to preserve them for efficiency.
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_log_module.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c index 5b9c79986..0962c8475 100644 --- a/src/http/modules/ngx_http_log_module.c +++ b/src/http/modules/ngx_http_log_module.c @@ -78,10 +78,6 @@ static void ngx_http_log_write(ngx_http_request_t *r, ngx_http_log_t *log, static ssize_t ngx_http_log_script_write(ngx_http_request_t *r, ngx_http_log_script_t *script, u_char **name, u_char *buf, size_t len); -static u_char *ngx_http_log_connection(ngx_http_request_t *r, u_char *buf, - ngx_http_log_op_t *op); -static u_char *ngx_http_log_connection_requests(ngx_http_request_t *r, - u_char *buf, ngx_http_log_op_t *op); static u_char *ngx_http_log_pipe(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op); static u_char *ngx_http_log_time(ngx_http_request_t *r, u_char *buf, @@ -194,9 +190,6 @@ static ngx_str_t ngx_http_combined_fmt = static ngx_http_log_var_t ngx_http_log_vars[] = { - { ngx_string("connection"), NGX_ATOMIC_T_LEN, ngx_http_log_connection }, - { ngx_string("connection_requests"), NGX_INT_T_LEN, - ngx_http_log_connection_requests }, { ngx_string("pipe"), 1, ngx_http_log_pipe }, { ngx_string("time_local"), sizeof("28/Sep/1970:12:00:00 +0600") - 1, ngx_http_log_time }, @@ -209,8 +202,6 @@ static ngx_http_log_var_t ngx_http_log_vars[] = { { ngx_string("bytes_sent"), NGX_OFF_T_LEN, ngx_http_log_bytes_sent }, { ngx_string("body_bytes_sent"), NGX_OFF_T_LEN, ngx_http_log_body_bytes_sent }, - { ngx_string("apache_bytes_sent"), NGX_OFF_T_LEN, - ngx_http_log_body_bytes_sent }, { ngx_string("request_length"), NGX_SIZE_T_LEN, ngx_http_log_request_length }, @@ -502,22 +493,6 @@ ngx_http_log_copy_long(ngx_http_request_t *r, u_char *buf, static u_char * -ngx_http_log_connection(ngx_http_request_t *r, u_char *buf, - ngx_http_log_op_t *op) -{ - return ngx_sprintf(buf, "%uA", r->connection->number); -} - - -static u_char * -ngx_http_log_connection_requests(ngx_http_request_t *r, u_char *buf, - ngx_http_log_op_t *op) -{ - return ngx_sprintf(buf, "%ui", r->connection->requests); -} - - -static u_char * ngx_http_log_pipe(ngx_http_request_t *r, u_char *buf, ngx_http_log_op_t *op) { if (r->pipeline) { @@ -1143,12 +1118,6 @@ ngx_http_log_compile_format(ngx_conf_t *cf, ngx_array_t *flushes, goto invalid; } - if (ngx_strncmp(var.data, "apache_bytes_sent", 17) == 0) { - ngx_conf_log_error(NGX_LOG_WARN, cf, 0, - "use \"$body_bytes_sent\" instead of " - "\"$apache_bytes_sent\""); - } - for (v = ngx_http_log_vars; v->name.len; v++) { if (v->name.len == var.len |
