[PATCH] Script: fix log level when matching regular expressions

Richard Fussenegger richard at fussenegger.info
Fri May 27 17:16:05 UTC 2016


Does this change result in the rewrite log only being available in debug
builds? This is actually a very bad thing. I already have the problem
that some people have a problem with nginx because the try_files log
entries are only retrievable with debug builds.

Regards

On 5/27/2016 7:11 PM, Giovani Rinaldi wrote:
> # HG changeset patch
> # User Giovani Rinaldi <giovani.rinaldi at azion.com
> <mailto:giovani.rinaldi at azion.com>>
> # Date 1464122415 0
> # Node ID a6209fc7fc0941be30850050025cfe830805b1a8
> # Parent  bc6fd7afeed6f7433c60634d9b0867ea3241b217
> Script: fix log level when matching regular expressions
>
> Log should be written to log directive that accepts debug level.
>
> diff -r bc6fd7afeed6 -r a6209fc7fc09 src/http/ngx_http_script.c
> --- a/src/http/ngx_http_script.c    Tue May 24 21:54:32 2016 +0300
> +++ b/src/http/ngx_http_script.c    Tue May 24 20:40:15 2016 +0000
> @@ -933,7 +933,7 @@
>
>      if (rc == NGX_DECLINED) {
>          if (e->log || (r->connection->log->log_level &
> NGX_LOG_DEBUG_HTTP)) {
> -            ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
> +            ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
>                            "\"%V\" does not match \"%V\"",
>                            &code->name, &e->line);
>          }
> @@ -967,7 +967,7 @@
>      }
>
>      if (e->log || (r->connection->log->log_level & NGX_LOG_DEBUG_HTTP)) {
> -        ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0,
> +        ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
>                        "\"%V\" matches \"%V\"", &code->name, &e->line);
>      }
>
>
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20160527/b3a9c916/attachment.html>


More information about the nginx-devel mailing list