diff 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
line wrap: on
line diff
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -837,7 +837,13 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx
 
     if (ngx_strcmp(value[1].data, "off") == 0) {
         llcf->off = 1;
-        return NGX_CONF_OK;
+        if (cf->args->nelts == 2) {
+            return NGX_CONF_OK;
+        }
+
+        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+                           "invalid parameter \"%V\"", &value[2]);
+        return NGX_CONF_ERROR;
     }
 
     if (llcf->logs == NULL) {