🎨 sync debug logging

This commit is contained in:
Liang Ding 2022-07-20 23:15:40 +08:00
parent 1fd0ab310c
commit 871496ad9a
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -496,6 +496,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())
if 1 > len(mergeResult.Upserts) && 1 > len(mergeResult.Removes) { // 没有数据变更
syncSameCount++