diff src/stream/ngx_stream_proxy_module.c @ 6461:a01e315b3a78

Stream: additional logging for UDP.
author Vladimir Homutov <vl@nginx.com>
date Fri, 18 Mar 2016 19:53:22 +0300
parents 8f038068f4bc
children cb8177ca0990
line wrap: on
line diff
--- 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_strea
             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_sess
         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);