diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2010-02-01 14:04:20 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2010-02-01 14:04:20 +0000 |
| commit | 13653be34e1674afd80cd18c55c385151537d0e3 (patch) | |
| tree | 15adbe27982f625cd7e784df6db1e5a43157336d /src/http/modules/ngx_http_log_module.c | |
| parent | 393300584e0fcd36356da7b7198e3f43afd97240 (diff) | |
| download | nginx-13653be34e1674afd80cd18c55c385151537d0e3.tar.gz nginx-13653be34e1674afd80cd18c55c385151537d0e3.tar.bz2 | |
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
Diffstat (limited to 'src/http/modules/ngx_http_log_module.c')
| -rw-r--r-- | src/http/modules/ngx_http_log_module.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c index 1ff105821..e1d99c05a 100644 --- 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_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) { |
