Skip to content

Commit

Permalink
[ISSUE alibaba#2293] Add clientID for warning log message in MQClient…
Browse files Browse the repository at this point in the history
…Instance (alibaba#2294)
  • Loading branch information
Jaskey authored Sep 12, 2020
1 parent 2f14aa5 commit 3eaabee
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ public void sendHeartbeatToAllBrokerWithLock() {
this.lockHeartbeat.unlock();
}
} else {
log.warn("lock heartBeat, but failed.");
log.warn("lock heartBeat, but failed. [{}]", this.clientId);
}
}

Expand Down Expand Up @@ -532,7 +532,7 @@ private void sendHeartbeatToAllBroker() {
final boolean producerEmpty = heartbeatData.getProducerDataSet().isEmpty();
final boolean consumerEmpty = heartbeatData.getConsumerDataSet().isEmpty();
if (producerEmpty && consumerEmpty) {
log.warn("sending heartbeat, but no consumer and no producer");
log.warn("sending heartbeat, but no consumer and no producer. [{}]", this.clientId);
return;
}

Expand Down Expand Up @@ -668,7 +668,7 @@ public boolean updateTopicRouteInfoFromNameServer(final String topic, boolean is
return true;
}
} else {
log.warn("updateTopicRouteInfoFromNameServer, getTopicRouteInfoFromNameServer return null, Topic: {}", topic);
log.warn("updateTopicRouteInfoFromNameServer, getTopicRouteInfoFromNameServer return null, Topic: {}. [{}]", topic, this.clientId);
}
} catch (MQClientException e) {
if (!topic.startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX)) {
Expand All @@ -681,7 +681,7 @@ public boolean updateTopicRouteInfoFromNameServer(final String topic, boolean is
this.lockNamesrv.unlock();
}
} else {
log.warn("updateTopicRouteInfoFromNameServer tryLock timeout {}ms", LOCK_TIMEOUT_MILLIS);
log.warn("updateTopicRouteInfoFromNameServer tryLock timeout {}ms. [{}]", LOCK_TIMEOUT_MILLIS, this.clientId);
}
} catch (InterruptedException e) {
log.warn("updateTopicRouteInfoFromNameServer Exception", e);
Expand Down Expand Up @@ -893,7 +893,7 @@ private void unregisterClientWithLock(final String producerGroup, final String c
this.lockHeartbeat.unlock();
}
} else {
log.warn("lock heartBeat, but failed.");
log.warn("lock heartBeat, but failed. [{}]", this.clientId);
}
} catch (InterruptedException e) {
log.warn("unregisterClientWithLock exception", e);
Expand Down

0 comments on commit 3eaabee

Please sign in to comment.