You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2016/04/07 21:25:03 UTC

qpid-dispatch git commit: DISPATCH-265 - Cleaned up the logging levels and log text in the router module.

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 9e638d61d -> 090d0555b


DISPATCH-265 - Cleaned up the logging levels and log text in the router module.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/090d0555
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/090d0555
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/090d0555

Branch: refs/heads/master
Commit: 090d0555b58234531924f397c3994df00110290e
Parents: 9e638d6
Author: Ted Ross <tr...@redhat.com>
Authored: Thu Apr 7 15:24:32 2016 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Thu Apr 7 15:24:32 2016 -0400

----------------------------------------------------------------------
 python/qpid_dispatch_internal/router/hello.py | 8 ++++++--
 python/qpid_dispatch_internal/router/node.py  | 4 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/090d0555/python/qpid_dispatch_internal/router/hello.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/router/hello.py b/python/qpid_dispatch_internal/router/hello.py
index 63cded3..6dbed13 100644
--- a/python/qpid_dispatch_internal/router/hello.py
+++ b/python/qpid_dispatch_internal/router/hello.py
@@ -18,7 +18,7 @@
 #
 
 from data import MessageHELLO
-from qpid_dispatch_internal.dispatch import LOG_INFO, LOG_TRACE
+from qpid_dispatch_internal.dispatch import LOG_INFO, LOG_TRACE, LOG_CRITICAL
 
 class HelloProtocol(object):
     """
@@ -32,6 +32,7 @@ class HelloProtocol(object):
         self.hello_interval  = container.config.helloInterval
         self.hello_max_age   = container.config.helloMaxAge
         self.hellos          = {}
+        self.dup_reported    = False
 
 
     def tick(self, now):
@@ -45,6 +46,9 @@ class HelloProtocol(object):
 
     def handle_hello(self, msg, now, link_id):
         if msg.id == self.id:
+            if not self.dup_reported and (msg.instance != self.container.instance):
+                self.dup_reported = True
+                self.container.log_hello(LOG_CRITICAL, "Detected Neighbor Router with a Duplicate ID - %s" % msg.id)
             return
         self.hellos[msg.id] = now
         if msg.is_seen(self.id):
@@ -59,5 +63,5 @@ class HelloProtocol(object):
         for key, last_seen in self.hellos.items():
             if now - last_seen > self.hello_max_age:
                 self.hellos.pop(key)
-                self.container.log_hello(LOG_INFO, "HELLO peer expired: %s" % key)
+                self.container.log_hello(LOG_TRACE, "HELLO peer expired: %s" % key)
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/090d0555/python/qpid_dispatch_internal/router/node.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/router/node.py b/python/qpid_dispatch_internal/router/node.py
index 1fd4f27..0719898 100644
--- a/python/qpid_dispatch_internal/router/node.py
+++ b/python/qpid_dispatch_internal/router/node.py
@@ -225,7 +225,7 @@ class NodeTracker(object):
         """
         Invoked when an inter-router link is dropped.
         """
-        self.container.log_ls(LOG_INFO, "Router Link Lost - link_id=%d" % link_id)
+        self.container.log_ls(LOG_INFO, "Link to Neighbor Router Lost - link_tag=%d" % link_id)
         node_id = self.link_id_to_node_id(link_id)
         if node_id:
             self.nodes_by_link_id.pop(link_id)
@@ -529,6 +529,6 @@ class RouterNode(object):
         self.instance = instance
         self.link_state.del_all_peers()
         self.unmap_all_addresses()
-        self.log(LOG_TRACE, "Node %s detected restart" % self.id)
+        self.log(LOG_INFO, "Detected Restart of Router Node %s" % self.id)
         return True
 


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