diff options
author | Ruslan Ermilov <ru@nginx.com> | 2011-12-06 21:07:10 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2011-12-06 21:07:10 +0000 |
commit | 59a2b7703959a5276d3a96207428a3b24df1b875 (patch) | |
tree | 99fa414197ac726f562de1348cecabb36f57c448 /src | |
parent | 5ee62edffe1ead7cbb94ac706fabe8f45432f7b3 (diff) | |
download | nginx-59a2b7703959a5276d3a96207428a3b24df1b875.tar.gz nginx-59a2b7703959a5276d3a96207428a3b24df1b875.zip |
- Improved error message when parsing of the "buffer" parameter of the
"access_log" directive fails.
- Added a warning if "log_format" is used in contexts other than "http".
Diffstat (limited to 'src')
-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 da6fbb619..cb9c77f6f 100644 --- a/src/http/modules/ngx_http_log_module.c +++ b/src/http/modules/ngx_http_log_module.c @@ -971,7 +971,7 @@ buffer: if (buf == NGX_ERROR) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, - "invalid parameter \"%V\"", &value[3]); + "invalid buffer value \"%V\"", &name); return NGX_CONF_ERROR; } @@ -1004,6 +1004,12 @@ ngx_http_log_set_format(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) ngx_uint_t i; ngx_http_log_fmt_t *fmt; + if (cf->cmd_type != NGX_HTTP_MAIN_CONF) { + ngx_conf_log_error(NGX_LOG_WARN, cf, 0, + "the \"log_format\" directive may be used " + "only on \"http\" level"); + } + value = cf->args->elts; fmt = lmcf->formats.elts; |