aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2014-12-01 14:51:36 +0300
committerSergey Kandaurov <pluknet@nginx.com>2014-12-01 14:51:36 +0300
commit778cc4b42ea85e19a8ebf6c1a42fc636e48ec309 (patch)
tree5aa74106411d106c5452b51965a6439a4604e469 /src
parentece388033aef4325691a676b08a2e5278de39e71 (diff)
downloadnginx-778cc4b42ea85e19a8ebf6c1a42fc636e48ec309.tar.gz
nginx-778cc4b42ea85e19a8ebf6c1a42fc636e48ec309.zip
Access log: restricted "log_format" to "http" level.
Specifying the "log_format" directive on levels other than "http" is deprecated since 73d37e1ccb91 (1.1.11).
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_log_module.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/http/modules/ngx_http_log_module.c b/src/http/modules/ngx_http_log_module.c
index 04aa27fda..df9424f83 100644
--- a/src/http/modules/ngx_http_log_module.c
+++ b/src/http/modules/ngx_http_log_module.c
@@ -152,7 +152,7 @@ static ngx_int_t ngx_http_log_init(ngx_conf_t *cf);
static ngx_command_t ngx_http_log_commands[] = {
{ ngx_string("log_format"),
- NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_2MORE,
+ NGX_HTTP_MAIN_CONF|NGX_CONF_2MORE,
ngx_http_log_set_format,
NGX_HTTP_MAIN_CONF_OFFSET,
0,
@@ -1448,12 +1448,6 @@ 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;