[PATCH] Stream: use correct action message when running stream log phase.

Datong Sun dndx at idndx.com
Thu Apr 19 05:59:41 UTC 2018


# HG changeset patch
# User Datong Sun <dndx at idndx.com>
# Date 1524117436 25200
#      Wed Apr 18 22:57:16 2018 -0700
# Node ID 883ccb0f25cc567938fd0fb4fb0a5ff814c40984
# Parent  7c614ef3c6ea330c62630d5065f961a27d0f82cd
Stream: use correct action message when running stream log phase.

Previously when executing the log handlers in stream subsystem,
the logger action was not being set correctly and results in
error messages generated while executing the log handlers to
have strange suffixes (such as "while returning text" when
ngx_stream_return_module was used as content handler).
This commit ensures those suffixes will have more meaningful
contents in them.

diff -r 7c614ef3c6ea -r 883ccb0f25cc src/stream/ngx_stream_handler.c
--- a/src/stream/ngx_stream_handler.c   Wed Apr 18 16:11:41 2018 +0300
+++ b/src/stream/ngx_stream_handler.c   Wed Apr 18 22:57:16 2018 -0700
@@ -301,8 +301,12 @@

     s->status = rc;

+    s->connection->log->action = "logging session";
+
     ngx_stream_log_session(s);

+    s->connection->log->action = "closing session";
+
     ngx_stream_close_connection(s->connection);
 }




Thanks,

-- 
Datong Sun
dndx at idndx.com


More information about the nginx-devel mailing list