Skip to content

Commit

Permalink
Merge pull request #1983 from areyouok/fix_Broker2Client_log
Browse files Browse the repository at this point in the history
[ISSUE #1992] fix Broker2Client logs
  • Loading branch information
RongtongJin committed May 15, 2020
2 parents af07705 + 16b38ba commit 7f10536
Showing 1 changed file with 9 additions and 8 deletions.
Expand Up @@ -70,7 +70,8 @@ public void checkProducerTransactionState(
try {
this.brokerController.getRemotingServer().invokeOneway(channel, request, 10);
} 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());
}
}

Expand All @@ -96,7 +97,7 @@ public void notifyConsumerIdsChanged(
try {
this.brokerController.getRemotingServer().invokeOneway(channel, request, 10);
} catch (Exception e) {
log.error("notifyConsumerIdsChanged exception, " + consumerGroup, e.getMessage());
log.error("notifyConsumerIdsChanged exception. group={}, error={}", consumerGroup, e.toString());
}
}

Expand Down Expand Up @@ -185,14 +186,14 @@ public RemotingCommand resetOffset(String topic, String group, long timeStamp, b
log.info("[reset-offset] reset offset success. topic={}, group={}, clientId={}",
topic, group, entry.getValue().getClientId());
} catch (Exception e) {
log.error("[reset-offset] reset offset exception. topic={}, group={}",
new Object[] {topic, group}, e);
log.error("[reset-offset] reset offset exception. topic={}, group={} ,error={}",
topic, group, e.toString());
}
} else {
response.setCode(ResponseCode.SYSTEM_ERROR);
response.setRemark("the client does not support this feature. 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));
return response;
}
Expand Down Expand Up @@ -253,7 +254,7 @@ public RemotingCommand getConsumeStatus(String topic, String group, String origi
result.setCode(ResponseCode.SYSTEM_ERROR);
result.setRemark("the client does not support this feature. 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));
return result;
} else if (UtilAll.isBlank(originClientId) || originClientId.equals(clientId)) {
Expand All @@ -279,8 +280,8 @@ public RemotingCommand getConsumeStatus(String topic, String group, String origi
}
} catch (Exception e) {
log.error(
"[get-consumer-status] get consumer status exception. topic={}, group={}, offset={}",
new Object[] {topic, group}, e);
"[get-consumer-status] get consumer status exception. topic={}, group={}, error={}",
topic, group, e.toString());
}

if (!UtilAll.isBlank(originClientId) && originClientId.equals(clientId)) {
Expand Down

0 comments on commit 7f10536

Please sign in to comment.