Skip to content

Commit

Permalink
modify log
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyijq committed Dec 30, 2018
1 parent d223170 commit a26389f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package qunar.tc.qmq.consumer.pull;

import com.google.common.base.Strings;
import com.google.common.base.Supplier;
import com.google.common.util.concurrent.RateLimiter;
import io.netty.util.Timeout;
Expand Down Expand Up @@ -273,7 +272,7 @@ public void success() {
LOGGER.error("ack send error: {}, {}", sendEntry, head);
sendErrorCount.inc();
} else {
LOGGER.debug("AckSendRet", "ok [{}, {}]", sendEntry.getPullOffsetBegin(), sendEntry.getPullOffsetLast());
LOGGER.debug("AckSendRet ok [{}, {}]", sendEntry.getPullOffsetBegin(), sendEntry.getPullOffsetLast());
sendEntryQueue.poll();
}

Expand All @@ -286,7 +285,7 @@ public void fail(Exception ex) {
if (ackSendFailLogLimit.tryAcquire()) {
LOGGER.warn("send ack fail, will retry next", ex);
}
LOGGER.debug("AckSendRet", "fail [{}, {}]", sendEntry.getPullOffsetBegin(), sendEntry.getPullOffsetLast());
LOGGER.debug("AckSendRet fail [{}, {}]", sendEntry.getPullOffsetBegin(), sendEntry.getPullOffsetLast());
sendFailCount.inc();
inSending.set(false);
}
Expand Down Expand Up @@ -349,12 +348,12 @@ public String getGroup() {
private static final AckService.SendAckCallback EMPTY_ACK_CALLBACK = new AckService.SendAckCallback() {
@Override
public void success() {
LOGGER.info("send empty Ack ok");
LOGGER.debug("send heartbeat ok");
}

@Override
public void fail(Exception ex) {
LOGGER.error("send empty Ack fail: " + Strings.nullToEmpty(ex.getMessage()));
LOGGER.error("send heartbeat fail", ex);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void requestWrapper(MetaInfoRequestParam param) {
Metrics.counter("qmq_pull_metainfo_request_count", SUBJECT_GROUP_ARRAY, new String[]{param.subject, param.group}).inc();
request(param);
} catch (Exception e) {
LOGGER.debug("MetaInfoService", "request meta info exception. {} {} {}", param.clientType.name(), param.subject, param.group, e);
LOGGER.debug("request meta info exception. {} {} {}", param.clientType.name(), param.subject, param.group, e);
Metrics.counter("qmq_pull_metainfo_request_fail", SUBJECT_GROUP_ARRAY, new String[]{param.subject, param.group}).inc();
}
}
Expand All @@ -120,7 +120,7 @@ private void request(MetaInfoRequestParam param) {
request.setRequestType(ClientRequestType.HEARTBEAT);
}

LOGGER.debug("MetaInfoServiceRequest", "meta info request: {}", request);
LOGGER.debug("meta info request: {}", request);
client.sendRequest(request);
}

Expand All @@ -130,7 +130,7 @@ public void onResponse(MetaInfoResponse response) {

MetaInfo metaInfo = parseResponse(response);
if (metaInfo != null) {
LOGGER.debug("MetaInfoService", "meta info: {}", metaInfo);
LOGGER.debug("meta info: {}", metaInfo);
eventBus.post(metaInfo);
} else {
LOGGER.warn("request meta info fail, will retry in a few seconds.");
Expand All @@ -141,7 +141,7 @@ private void updateConsumerState(MetaInfoResponse response) {
updateLock.lock();
try {
if (isStale(response.getTimestamp(), lastUpdateTimestamp)) {
LOGGER.debug("MetaInfoService", "skip response {}", response);
LOGGER.debug("skip response {}", response);
return;
}
lastUpdateTimestamp = response.getTimestamp();
Expand All @@ -151,7 +151,7 @@ private void updateConsumerState(MetaInfoResponse response) {

if (RetrySubjectUtils.isRealSubject(subject) && !Strings.isNullOrEmpty(consumerGroup)) {
boolean online = response.getOnOfflineState() == OnOfflineState.ONLINE;
LOGGER.debug("MetaInfoService", "消费者状态发生变更 {}/{}:{}", subject, consumerGroup, online);
LOGGER.debug("消费者状态发生变更 {}/{}:{}", subject, consumerGroup, online);
triggerConsumerStateChanged(subject, consumerGroup, online);
}

Expand Down

0 comments on commit a26389f

Please sign in to comment.