提交 16b38ba9 编写于 作者: H huangli

fix Broker2Client logs

上级 3d13dae7
...@@ -70,7 +70,8 @@ public class Broker2Client { ...@@ -70,7 +70,8 @@ public class Broker2Client {
try { try {
this.brokerController.getRemotingServer().invokeOneway(channel, request, 10); this.brokerController.getRemotingServer().invokeOneway(channel, request, 10);
} catch (Exception e) { } catch (Exception e) {
log.error("Check transaction failed because invoke producer exception. group={}, msgId={}", group, messageExt.getMsgId(), e.getMessage()); log.error("Check transaction failed because invoke producer exception. group={}, msgId={}, error={}",
group, messageExt.getMsgId(), e.toString());
} }
} }
...@@ -96,7 +97,7 @@ public class Broker2Client { ...@@ -96,7 +97,7 @@ public class Broker2Client {
try { try {
this.brokerController.getRemotingServer().invokeOneway(channel, request, 10); this.brokerController.getRemotingServer().invokeOneway(channel, request, 10);
} catch (Exception e) { } catch (Exception e) {
log.error("notifyConsumerIdsChanged exception, " + consumerGroup, e.getMessage()); log.error("notifyConsumerIdsChanged exception. group={}, error={}", consumerGroup, e.toString());
} }
} }
...@@ -185,14 +186,14 @@ public class Broker2Client { ...@@ -185,14 +186,14 @@ public class Broker2Client {
log.info("[reset-offset] reset offset success. topic={}, group={}, clientId={}", log.info("[reset-offset] reset offset success. topic={}, group={}, clientId={}",
topic, group, entry.getValue().getClientId()); topic, group, entry.getValue().getClientId());
} catch (Exception e) { } catch (Exception e) {
log.error("[reset-offset] reset offset exception. topic={}, group={}", log.error("[reset-offset] reset offset exception. topic={}, group={} ,error={}",
new Object[] {topic, group}, e); topic, group, e.toString());
} }
} else { } else {
response.setCode(ResponseCode.SYSTEM_ERROR); response.setCode(ResponseCode.SYSTEM_ERROR);
response.setRemark("the client does not support this feature. version=" response.setRemark("the client does not support this feature. version="
+ MQVersion.getVersionDesc(version)); + MQVersion.getVersionDesc(version));
log.warn("[reset-offset] the client does not support this feature. version={}", log.warn("[reset-offset] the client does not support this feature. channel={}, version={}",
RemotingHelper.parseChannelRemoteAddr(entry.getKey()), MQVersion.getVersionDesc(version)); RemotingHelper.parseChannelRemoteAddr(entry.getKey()), MQVersion.getVersionDesc(version));
return response; return response;
} }
...@@ -253,7 +254,7 @@ public class Broker2Client { ...@@ -253,7 +254,7 @@ public class Broker2Client {
result.setCode(ResponseCode.SYSTEM_ERROR); result.setCode(ResponseCode.SYSTEM_ERROR);
result.setRemark("the client does not support this feature. version=" result.setRemark("the client does not support this feature. version="
+ MQVersion.getVersionDesc(version)); + MQVersion.getVersionDesc(version));
log.warn("[get-consumer-status] the client does not support this feature. version={}", log.warn("[get-consumer-status] the client does not support this feature. channel={}, version={}",
RemotingHelper.parseChannelRemoteAddr(entry.getKey()), MQVersion.getVersionDesc(version)); RemotingHelper.parseChannelRemoteAddr(entry.getKey()), MQVersion.getVersionDesc(version));
return result; return result;
} else if (UtilAll.isBlank(originClientId) || originClientId.equals(clientId)) { } else if (UtilAll.isBlank(originClientId) || originClientId.equals(clientId)) {
...@@ -279,8 +280,8 @@ public class Broker2Client { ...@@ -279,8 +280,8 @@ public class Broker2Client {
} }
} catch (Exception e) { } catch (Exception e) {
log.error( log.error(
"[get-consumer-status] get consumer status exception. topic={}, group={}, offset={}", "[get-consumer-status] get consumer status exception. topic={}, group={}, error={}",
new Object[] {topic, group}, e); topic, group, e.toString());
} }
if (!UtilAll.isBlank(originClientId) && originClientId.equals(clientId)) { if (!UtilAll.isBlank(originClientId) && originClientId.equals(clientId)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册