You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "lizhanhui (via GitHub)" <gi...@apache.org> on 2024/10/23 14:22:16 UTC
Re: [PR] [ISSUE #8777] enhance error log when when can't connect to namesrv addrs [rocketmq]
lizhanhui commented on code in PR #8778:
URL: https://github.com/apache/rocketmq/pull/8778#discussion_r1812890540
##########
client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java:
##########
@@ -839,8 +839,8 @@ public boolean updateTopicRouteInfoFromNameServer(final String topic, boolean is
log.warn("updateTopicRouteInfoFromNameServer Exception", e);
}
} catch (RemotingException e) {
- log.error("updateTopicRouteInfoFromNameServer Exception", e);
- throw new IllegalStateException(e);
+ log.error("updateTopicRouteInfoFromNameServer Exception, namesrvAddr: " + clientConfig.getNamesrvAddr(), e);
Review Comment:
Please log with formatter, not string concatenation. See https://medium.com/@mohanakrishnakavali/logging-efficiency-in-java-string-concatenation-vs-string-format-efa02055ddae
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org