提交 c183e0d4 编写于 作者: J Jaskey 提交者: dongeforever

[ROCKETMQ-172]log improvement for rocketmq client closes apache/incubator-rocketmq#90

上级 7bcb3b3e
...@@ -593,12 +593,12 @@ public class MQClientAPIImpl { ...@@ -593,12 +593,12 @@ public class MQClientAPIImpl {
} }
} else { } else {
if (!responseFuture.isSendRequestOK()) { if (!responseFuture.isSendRequestOK()) {
pullCallback.onException(new MQClientException("send request failed", responseFuture.getCause())); pullCallback.onException(new MQClientException("send request failed to " + addr + ". Request: " + request, responseFuture.getCause()));
} else if (responseFuture.isTimeout()) { } else if (responseFuture.isTimeout()) {
pullCallback.onException(new MQClientException("wait response timeout " + responseFuture.getTimeoutMillis() + "ms", pullCallback.onException(new MQClientException("wait response from " + addr + " timeout :" + responseFuture.getTimeoutMillis() + "ms" + ". Request: " + request,
responseFuture.getCause())); responseFuture.getCause()));
} else { } else {
pullCallback.onException(new MQClientException("unknow reseaon", responseFuture.getCause())); pullCallback.onException(new MQClientException("unknown reason. addr: " + addr + ", timeoutMillis: " + timeoutMillis + ". Request: " + request, responseFuture.getCause()));
} }
} }
} }
......
...@@ -596,7 +596,7 @@ public class MQClientInstance { ...@@ -596,7 +596,7 @@ public class MQClientInstance {
} }
} }
} }
log.info("topicRouteTable.put TopicRouteData[{}]", cloneTopicRouteData); log.info("topicRouteTable.put. Topic = {}, TopicRouteData[{}]", topic, cloneTopicRouteData);
this.topicRouteTable.put(topic, cloneTopicRouteData); this.topicRouteTable.put(topic, cloneTopicRouteData);
return true; return true;
} }
......
...@@ -321,6 +321,7 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements Remoti ...@@ -321,6 +321,7 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements Remoti
if (update) { if (update) {
Collections.shuffle(addrs); Collections.shuffle(addrs);
log.info("name server address updated. NEW : {} , OLD: {}",addrs,old);
this.namesrvAddrList.set(addrs); this.namesrvAddrList.set(addrs);
} }
} }
...@@ -398,6 +399,7 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements Remoti ...@@ -398,6 +399,7 @@ public class NettyRemotingClient extends NettyRemotingAbstract implements Remoti
String newAddr = addrList.get(index); String newAddr = addrList.get(index);
this.namesrvAddrChoosed.set(newAddr); this.namesrvAddrChoosed.set(newAddr);
log.info("new name server is chosen. OLD: {} , NEW: {}. namesrvIndex = {}", addr, newAddr, namesrvIndex);
Channel channelNew = this.createChannel(newAddr); Channel channelNew = this.createChannel(newAddr);
if (channelNew != null) if (channelNew != null)
return channelNew; return channelNew;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册