Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Oct 30, 2023
1 parent be65f6f commit e115956
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,20 @@ func (repo *Repo) sync0(context map[string]interface{},
cloudUpserts, cloudRemoves = repo.DiffUpsertRemove(cloudLatestFiles, latestFiles, true)
}

// 增加一些诊断日志 https://ld246.com/article/1698370932077
for _, c := range cloudUpserts {
logging.LogInfof("cloud upsert [%s, %d]", c.Path, c.Updated)
}
for _, r := range cloudRemoves {
logging.LogInfof("cloud remove [%s, %d]", r.Path, r.Updated)
}
for _, c := range localUpserts {
logging.LogInfof("local upsert [%s, %d]", c.Path, c.Updated)
}
for _, r := range localRemoves {
logging.LogInfof("local remove [%s, %d", r.Path, r.Updated)
}

// 避免旧的本地数据覆盖云端数据 https://github.com/siyuan-note/siyuan/issues/7403
localUpserts = repo.filterLocalUpserts(localUpserts, cloudUpserts)

Expand Down

0 comments on commit e115956

Please sign in to comment.