comparison src/http/modules/ngx_http_log_module.c @ 4885:8f1ad536caf1

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 03 Oct 2012 15:25:06 +0000
parents 4c36e15651f7
children e89bd9896fea
comparison
equal deleted inserted replaced
4884:e406c997470a 4885:8f1ad536caf1
207 ngx_http_log_request_time }, 207 ngx_http_log_request_time },
208 { ngx_string("status"), NGX_INT_T_LEN, ngx_http_log_status }, 208 { ngx_string("status"), NGX_INT_T_LEN, ngx_http_log_status },
209 { ngx_string("bytes_sent"), NGX_OFF_T_LEN, ngx_http_log_bytes_sent }, 209 { ngx_string("bytes_sent"), NGX_OFF_T_LEN, ngx_http_log_bytes_sent },
210 { ngx_string("body_bytes_sent"), NGX_OFF_T_LEN, 210 { ngx_string("body_bytes_sent"), NGX_OFF_T_LEN,
211 ngx_http_log_body_bytes_sent }, 211 ngx_http_log_body_bytes_sent },
212 { ngx_string("apache_bytes_sent"), NGX_OFF_T_LEN,
213 ngx_http_log_body_bytes_sent },
214 { ngx_string("request_length"), NGX_SIZE_T_LEN, 212 { ngx_string("request_length"), NGX_SIZE_T_LEN,
215 ngx_http_log_request_length }, 213 ngx_http_log_request_length },
216 214
217 { ngx_null_string, 0, NULL } 215 { ngx_null_string, 0, NULL }
218 }; 216 };
1141 1139
1142 if (var.len == 0) { 1140 if (var.len == 0) {
1143 goto invalid; 1141 goto invalid;
1144 } 1142 }
1145 1143
1146 if (ngx_strncmp(var.data, "apache_bytes_sent", 17) == 0) {
1147 ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
1148 "use \"$body_bytes_sent\" instead of "
1149 "\"$apache_bytes_sent\"");
1150 }
1151
1152 for (v = ngx_http_log_vars; v->name.len; v++) { 1144 for (v = ngx_http_log_vars; v->name.len; v++) {
1153 1145
1154 if (v->name.len == var.len 1146 if (v->name.len == var.len
1155 && ngx_strncmp(v->name.data, var.data, var.len) == 0) 1147 && ngx_strncmp(v->name.data, var.data, var.len) == 0)
1156 { 1148 {