From aa281434147b8de279cb4bf894f61dd4ddcbf9d2 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 27 Jul 2022 21:27:34 +0800 Subject: [PATCH] :art: Update sync logging --- kernel/model/repository.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/model/repository.go b/kernel/model/repository.go index a4b54cf33..f1c71658f 100644 --- a/kernel/model/repository.go +++ b/kernel/model/repository.go @@ -529,8 +529,8 @@ func syncRepo(boot, exit, byHand bool) { msg := fmt.Sprintf(Conf.Language(150), trafficStat.UploadFileCount, trafficStat.DownloadFileCount, trafficStat.UploadChunkCount, trafficStat.DownloadChunkCount, humanize.Bytes(uint64(trafficStat.UploadBytes)), humanize.Bytes(uint64(trafficStat.DownloadBytes))) Conf.Sync.Stat = msg syncDownloadErrCount = 0 - logging.LogInfof("synced data repo [uploadFileCount=%d, downloadFileCount=%d, uploadChunkCount=%d, downloadChunkCount=%d, uploadBytes=%d, downloadBytes=%d] in [%.2fs]", - trafficStat.UploadFileCount, trafficStat.DownloadFileCount, trafficStat.UploadChunkCount, trafficStat.DownloadChunkCount, trafficStat.UploadBytes, trafficStat.DownloadBytes, elapsed.Seconds()) + logging.LogInfof("synced data repo [ufc=%d, dfc=%d, ucc=%d, dcc=%d, ub=%s, db=%s] in [%.2fs]", + trafficStat.UploadFileCount, trafficStat.DownloadFileCount, trafficStat.UploadChunkCount, trafficStat.DownloadChunkCount, humanize.Bytes(uint64(trafficStat.UploadBytes)), humanize.Bytes(uint64(trafficStat.DownloadBytes)), elapsed.Seconds()) if 1 > len(mergeResult.Upserts) && 1 > len(mergeResult.Removes) { // 没有数据变更 syncSameCount++