comparison src/http/modules/ngx_http_log_module.c @ 3426:eef19bd3c51e stable-0.7

merge r3039, r3145: access_log fixes: *) strict testing "access_log off" *) allow to log invalid $request in access_log always, before it was logged only if error_log was set to info or debug level
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Feb 2010 14:04:20 +0000
parents 415400fa0f10
children 3354dfba9da4
comparison
equal deleted inserted replaced
3425:0189a8f4c7c3 3426:eef19bd3c51e
835 835
836 value = cf->args->elts; 836 value = cf->args->elts;
837 837
838 if (ngx_strcmp(value[1].data, "off") == 0) { 838 if (ngx_strcmp(value[1].data, "off") == 0) {
839 llcf->off = 1; 839 llcf->off = 1;
840 return NGX_CONF_OK; 840 if (cf->args->nelts == 2) {
841 return NGX_CONF_OK;
842 }
843
844 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
845 "invalid parameter \"%V\"", &value[2]);
846 return NGX_CONF_ERROR;
841 } 847 }
842 848
843 if (llcf->logs == NULL) { 849 if (llcf->logs == NULL) {
844 llcf->logs = ngx_array_create(cf->pool, 2, sizeof(ngx_http_log_t)); 850 llcf->logs = ngx_array_create(cf->pool, 2, sizeof(ngx_http_log_t));
845 if (llcf->logs == NULL) { 851 if (llcf->logs == NULL) {