Stream module logging questions

Roman Arutyunyan arut at nginx.com
Thu Mar 1 11:52:43 UTC 2018


Hello,

On Thu, Mar 01, 2018 at 04:06:09AM +0100, Grzegorz Kulewski wrote:
> Hello,
> 
> 1. How can I log the IP and (especially) the port used by nginx (proxy) to connect to upstream when stream module is used?
> 2. Can I somehow get a log entry also/instead at stream connection setup time, not only after it ends?

Stream module logs this in error.log with 'info' log level as soon as this
information is available:

2018/03/01 14:37:27 [info] 38462#0: *1 client 127.0.0.1:61020 connected to 0.0.0.0:9000
2018/03/01 14:37:27 [info] 38462#0: *1 proxy 127.0.0.1:61021 connected to 127.0.0.1:8001

> 3. I think that $tcpinfo_* aren't supported in stream. Is there any reason for this?

There's a number of http module features still missing in stream.
This is one of them.

-- 
Roman Arutyunyan


More information about the nginx mailing list