Optimize client and server interaction logs.

pull/161/head
chen.ma 3 years ago
parent 21e9c83d10
commit c22989516e

@ -133,15 +133,12 @@ public class LongPollingService {
if (isFixedPolling()) { if (isFixedPolling()) {
timeout = Math.max(10000, getFixedPollingInterval()); timeout = Math.max(10000, getFixedPollingInterval());
} else { } else {
long start = System.currentTimeMillis();
List<String> changedGroups = Md5ConfigUtil.compareMd5(req, clientMd5Map); List<String> changedGroups = Md5ConfigUtil.compareMd5(req, clientMd5Map);
if (changedGroups.size() > 0) { if (changedGroups.size() > 0) {
generateResponse(rsp, changedGroups); generateResponse(rsp, changedGroups);
return; return;
} else if (noHangUpFlag != null && noHangUpFlag.equalsIgnoreCase(TRUE_STR)) { } else if (noHangUpFlag != null && noHangUpFlag.equalsIgnoreCase(TRUE_STR)) {
log.info("{}|{}|{}|{}|{}|{}|{}", System.currentTimeMillis() - start, "nohangup", log.info("New initializing cacheData added in.");
RequestUtil.getRemoteIp(req), "polling", clientMd5Map.size(), probeRequestSize,
changedGroups.size());
return; return;
} }
} }

@ -53,7 +53,7 @@ public class CacheData {
ManagerListenerWrap managerListenerWrap = new ManagerListenerWrap(md5, listener); ManagerListenerWrap managerListenerWrap = new ManagerListenerWrap(md5, listener);
if (listeners.addIfAbsent(managerListenerWrap)) { if (listeners.addIfAbsent(managerListenerWrap)) {
log.info("[add-listener] ok, tpId :: {}, cnt :: {}", tpId, listeners.size()); log.info("Add listener status :: ok, tpId :: {}, cnt :: {}", tpId, listeners.size());
} }
} }

Loading…
Cancel
Save