This is an automated email from the ASF dual-hosted git repository.

gmurthy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
     new 34a02c9  DISPATCH-1410 - Added INFO logging to links that the router 
creates like auto links
34a02c9 is described below

commit 34a02c99234b4c082105e7123113ba062f6afbe2
Author: Ganesh Murthy <gmur...@apache.org>
AuthorDate: Fri Sep 6 19:35:25 2019 -0400

    DISPATCH-1410 - Added INFO logging to links that the router creates like 
auto links
---
 src/router_core/connections.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/router_core/connections.c b/src/router_core/connections.c
index 8c97ec9..cc50ba2 100644
--- a/src/router_core/connections.c
+++ b/src/router_core/connections.c
@@ -1038,6 +1038,22 @@ qdr_link_t *qdr_create_link_CT(qdr_core_t       *core,
     work->source    = source;
     work->target    = target;
 
+    char   source_str[1000];
+    char   target_str[1000];
+    size_t source_len = 1000;
+    size_t target_len = 1000;
+
+    source_str[0] = '\0';
+    target_str[0] = '\0';
+
+    if (qd_log_enabled(core->log, QD_LOG_INFO)) {
+        qdr_terminus_format(source, source_str, &source_len);
+        qdr_terminus_format(target, target_str, &target_len);
+    }
+
+    qd_log(core->log, QD_LOG_INFO, "[C%"PRIu64"][L%"PRIu64"] Link attached: 
dir=%s source=%s target=%s",
+               conn->identity, link->identity, dir == QD_INCOMING ? "in" : 
"out", source_str, target_str);
+
     qdr_connection_enqueue_work_CT(core, conn, work);
     return link;
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to