Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Update sync logging

Liang Dingaa281434147b
diff --git a/kernel/model/repository.go b/kernel/model/repository.go
index a4b54cf339..f1c71658f6 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++