Skip to content

Commit

Permalink
[ROCKETMQ-172]log improvement for rocketmq client closes apache#90
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskey authored and dongeforever committed Apr 17, 2017
1 parent 7bcb3b3 commit c183e0d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -593,12 +593,12 @@ public void operationComplete(ResponseFuture responseFuture) {
}
} else {
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()) {
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()));
} else {
pullCallback.onException(new MQClientException("unknow reseaon", responseFuture.getCause()));
pullCallback.onException(new MQClientException("unknown reason. addr: " + addr + ", timeoutMillis: " + timeoutMillis + ". Request: " + request, responseFuture.getCause()));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ public boolean updateTopicRouteInfoFromNameServer(final String topic, boolean is
}
}
}
log.info("topicRouteTable.put TopicRouteData[{}]", cloneTopicRouteData);
log.info("topicRouteTable.put. Topic = {}, TopicRouteData[{}]", topic, cloneTopicRouteData);
this.topicRouteTable.put(topic, cloneTopicRouteData);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ public void updateNameServerAddressList(List<String> addrs) {

if (update) {
Collections.shuffle(addrs);
log.info("name server address updated. NEW : {} , OLD: {}",addrs,old);
this.namesrvAddrList.set(addrs);
}
}
Expand Down Expand Up @@ -398,6 +399,7 @@ private Channel getAndCreateNameserverChannel() throws InterruptedException {
String newAddr = addrList.get(index);

this.namesrvAddrChoosed.set(newAddr);
log.info("new name server is chosen. OLD: {} , NEW: {}. namesrvIndex = {}", addr, newAddr, namesrvIndex);
Channel channelNew = this.createChannel(newAddr);
if (channelNew != null)
return channelNew;
Expand Down

0 comments on commit c183e0d

Please sign in to comment.