diff options
author | Vladimir Homutov <vl@nginx.com> | 2016-03-18 19:53:22 +0300 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2016-03-18 19:53:22 +0300 |
commit | 818ebb3492d7def9291f9338242e2f62a7ffbaa5 (patch) | |
tree | c06268b241d968ef8688d2009f4483e219aeae19 /src/stream/ngx_stream_proxy_module.c | |
parent | 2e6e2467949e2ae8b8ff2ec6a190ba9e37991218 (diff) | |
download | nginx-818ebb3492d7def9291f9338242e2f62a7ffbaa5.tar.gz nginx-818ebb3492d7def9291f9338242e2f62a7ffbaa5.zip |
Stream: additional logging for UDP.
Diffstat (limited to 'src/stream/ngx_stream_proxy_module.c')
-rw-r--r-- | src/stream/ngx_stream_proxy_module.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/stream/ngx_stream_proxy_module.c b/src/stream/ngx_stream_proxy_module.c index ad3acbaf1..6c535fdd1 100644 --- a/src/stream/ngx_stream_proxy_module.c +++ b/src/stream/ngx_stream_proxy_module.c @@ -552,7 +552,9 @@ ngx_stream_proxy_init_upstream(ngx_stream_session_t *s) handler = c->log->handler; c->log->handler = NULL; - ngx_log_error(NGX_LOG_INFO, c->log, 0, "proxy %V connected to %V", + ngx_log_error(NGX_LOG_INFO, c->log, 0, + "%sproxy %V connected to %V", + pc->type == SOCK_DGRAM ? "udp " : "", &str, u->peer.name); c->log->handler = handler; @@ -1222,9 +1224,10 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream, c->log->handler = NULL; ngx_log_error(NGX_LOG_INFO, c->log, 0, - "%s disconnected" + "%s%s disconnected" ", bytes from/to client:%O/%O" ", bytes from/to upstream:%O/%O", + src->type == SOCK_DGRAM ? "udp " : "", from_upstream ? "upstream" : "client", s->received, c->sent, u->received, pc ? pc->sent : 0); |