Skip to content

Commit

Permalink
reduce cache log (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
atellwu authored Feb 17, 2020
1 parent c95c518 commit a6d1741
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void start() {
pubStr.append(logPublisher(publisher)).append(";");
}
}
LOGGER.info("[Datum] dataInfoId={}, version={}, dataCenter={}, publishers=[{}]", dataInfoId,
LOGGER.info("[Datum]{},{},{},[{}]", dataInfoId,
data.getVersion(), dataCenter, pubStr.toString());
}
int pubCount = datumMap.values().stream().map(Datum::getPubMap)
Expand All @@ -82,16 +82,15 @@ public void start() {
} catch (Throwable t) {
LOGGER.error("[CacheDigestTask] cache digest error", t);
}
}, 30, 300, TimeUnit.SECONDS);
}, 30, 600, TimeUnit.SECONDS);
}

private String logPublisher(Publisher publisher) {
if (publisher != null) {
URL url = publisher.getSourceAddress();
String urlStr = url != null ? url.getAddressString() : "null";
return String.format("registerId=%s, registerTimestamp=%s, host=%s, version=%s",
publisher.getRegisterId(), publisher.getRegisterTimestamp(), urlStr,
publisher.getVersion());
return String.format("%s,%s,%s,%s", publisher.getRegisterId(),
publisher.getRegisterTimestamp(), urlStr, publisher.getVersion());
}
return "";
}
Expand Down

0 comments on commit a6d1741

Please sign in to comment.