[PATCH] Stream: added extra variables for logging

Vladimir Homutov vl at nginx.com
Fri Jul 10 14:03:10 UTC 2020


On Thu, Jul 09, 2020 at 04:20:16PM +0200, Balazs Hinel wrote:
> # HG changeset patch
> # User Balazs Hinel <balazs.hinel at nokia.com>
> # Date 1594225255 -7200
> #      Wed Jul 08 18:20:55 2020 +0200
> # Node ID ab1359d9762109d1cccb06fbe85e17168b51ebed
> # Parent  2ab0ecfe5a5f02f7214b02c8a1f9d6c5843d310e
> Stream: added extra variables for logging.
>
> As a result, the local and remote connection details (address and port)
> used in the upstream connection can be logged.
>
> diff -r 2ab0ecfe5a5f -r ab1359d97621 src/stream/ngx_stream.h
> --- a/src/stream/ngx_stream.h	Tue Jul 07 18:56:06 2020 +0300
> +++ b/src/stream/ngx_stream.h	Wed Jul 08 18:20:55 2020 +0200
> @@ -192,6 +192,14 @@
>  } ngx_stream_core_srv_conf_t;
>

Hello and thank you for contribution!

What problem are you trying to solve and why existing variables

http://nginx.org/en/docs/stream/ngx_stream_upstream_module.html#var_upstream_addr
http://nginx.org/en/docs/stream/ngx_stream_core_module.html#var_remote_addr
http://nginx.org/en/docs/stream/ngx_stream_realip_module.html#var_realip_remote_addr

are not enough?

Note also that we log connection events in the error log at INFO level in the
stream module.


More information about the nginx-devel mailing list