From 98306b5adba989c18dd0496c62c30699e18d60a0 Mon Sep 17 00:00:00 2001 From: fengzero Date: Fri, 24 Jun 2022 11:32:44 +0000 Subject: [PATCH] connection: add buf used log --- plugins/restful/rest.c | 2 ++ src/connection/connection.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/plugins/restful/rest.c b/plugins/restful/rest.c index 40c87056..2cbe3d2e 100644 --- a/plugins/restful/rest.c +++ b/plugins/restful/rest.c @@ -196,6 +196,8 @@ static int dashb_plugin_close(neu_plugin_t *plugin) { int rv = 0; + nlog_info("Success to before free plugin: %s", + neu_plugin_module.module_name); nng_http_server_stop(plugin->api_server); nng_http_server_release(plugin->api_server); nng_http_server_stop(plugin->web_server); diff --git a/src/connection/connection.c b/src/connection/connection.c index cf786a82..08eb5369 100644 --- a/src/connection/connection.c +++ b/src/connection/connection.c @@ -776,6 +776,8 @@ void neu_conn_stream_consume(neu_conn_t *conn, void *context, while (neu_protocol_unpack_buf_unused_size(&protocol_buf) > 0) { int used = fn(context, &protocol_buf); + zlog_debug(conn->param.log, "buf used: %d offset: %d", used, + offset); if (used == 0) { break; } else if (used == -1) {