From 0794c808b90346d36dea1639bb9f6249e3fcb464 Mon Sep 17 00:00:00 2001 From: kimchy Date: Thu, 1 Apr 2010 23:38:23 +0300 Subject: [PATCH] add more logging to jgroups disco --- .../elasticsearch/discovery/jgroups/JgroupsDiscovery.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java index fd9786c9a6e..6ddd1b3910b 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java @@ -250,6 +250,11 @@ public class JgroupsDiscovery extends AbstractLifecycleComponent impl BytesStreamInput is = new BytesStreamInput(msg.getBuffer()); final Node newNode = Node.readNode(is); is.close(); + + if (logger.isDebugEnabled()) { + logger.debug("Received node information from [{}], node [{}]", msg.getSrc(), newNode); + } + clusterService.submitStateUpdateTask("jgroups-disco-receive(from node[" + newNode + "])", new ClusterStateUpdateTask() { @Override public ClusterState execute(ClusterState currentState) { if (currentState.nodes().nodeExists(newNode.id())) { @@ -261,7 +266,7 @@ public class JgroupsDiscovery extends AbstractLifecycleComponent impl } }); } catch (Exception e) { - logger.warn("Can't read address from cluster member, message [" + msg.getClass().getName() + "/" + msg + "]", e); + logger.warn("Can't read address from cluster member [" + msg.getSrc() + "] message [" + msg.getClass().getName() + "/" + msg + "]", e); } return;