Mercurial > hg > nginx
changeset 4327:73d37e1ccb91
- 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".
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 06 Dec 2011 21:07:10 +0000 |
parents | 7423800ef437 |
children | d15a00e6d9e6 |
files | src/http/modules/ngx_http_log_module.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_log_module.c Tue Dec 06 15:49:40 2011 +0000 +++ b/src/http/modules/ngx_http_log_module.c Tue Dec 06 21:07:10 2011 +0000 @@ -971,7 +971,7 @@ 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_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;