]> git.kaiwu.me - nginx.git/commitdiff
strict testing "access_log off"
authorIgor Sysoev <igor@sysoev.ru>
Sun, 23 Aug 2009 17:06:33 +0000 (17:06 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 23 Aug 2009 17:06:33 +0000 (17:06 +0000)
src/http/modules/ngx_http_log_module.c

index 170e3a2649b6de212e4a8c91c6b7ba08d5e677c2..a5ace7d6347b10d1ff9d5414f8b732d646182665 100644 (file)
@@ -837,7 +837,13 @@ ngx_http_log_set_log(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
     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) {