Welcome! Log In Create A New Profile

Advanced

[nginx] Access log: restricted "log_format" to "http" level.

Sergey Kandaurov
December 01, 2014 06:54AM
details: http://hg.nginx.org/nginx/rev/ac2a8e4d8f01
branches:
changeset: 5927:ac2a8e4d8f01
user: Sergey Kandaurov <pluknet@nginx.com>
date: Mon Dec 01 14:51:36 2014 +0300
description:
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:

src/http/modules/ngx_http_log_module.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)

diffs (25 lines):

diff -r 08bfc7188a41 -r ac2a8e4d8f01 src/http/modules/ngx_http_log_module.c
--- a/src/http/modules/ngx_http_log_module.c Fri Nov 28 16:58:39 2014 +0300
+++ b/src/http/modules/ngx_http_log_module.c Mon Dec 01 14:51:36 2014 +0300
@@ -152,7 +152,7 @@ static ngx_int_t ngx_http_log_init(ngx_c
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_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;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Access log: restricted "log_format" to "http" level.

Sergey Kandaurov 643 December 01, 2014 06:54AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 242
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready