This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 16b38ba fix Broker2Client logs
new 7f10536 Merge pull request #1983 from areyouok/fix_Broker2Client_log
16b38ba is described below
commit 16b38ba9b2fd0d7a0f0da4da05db013d1da86b8e
Author: huangli <[email protected]>
AuthorDate: Mon May 11 18:33:48 2020 +0800
fix Broker2Client logs
---
.../rocketmq/broker/client/net/Broker2Client.java | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git
a/broker/src/main/java/org/apache/rocketmq/broker/client/net/Broker2Client.java
b/broker/src/main/java/org/apache/rocketmq/broker/client/net/Broker2Client.java
index 4c409f2..4d28cd8 100644
---
a/broker/src/main/java/org/apache/rocketmq/broker/client/net/Broker2Client.java
+++
b/broker/src/main/java/org/apache/rocketmq/broker/client/net/Broker2Client.java
@@ -70,7 +70,8 @@ public class Broker2Client {
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());
}
}
@@ -96,7 +97,7 @@ public class Broker2Client {
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());
}
}
@@ -185,14 +186,14 @@ public class Broker2Client {
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;
}
@@ -253,7 +254,7 @@ public class Broker2Client {
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)) {
@@ -279,8 +280,8 @@ public class Broker2Client {
}
} 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)) {