diff options
author | zeripath <art27@cantab.net> | 2022-03-10 10:09:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 10:09:48 +0000 |
commit | 75eb6cc9c1efde75d2b34d85d4a3e4f8484e6ab4 (patch) | |
tree | 4bb86ebef192609633a89cc9f05bdfc9ad85e77a /models | |
parent | 1314f38b59748397b3429fb9bc9f9d6bac85d2f2 (diff) | |
download | gitea-75eb6cc9c1efde75d2b34d85d4a3e4f8484e6ab4.tar.gz gitea-75eb6cc9c1efde75d2b34d85d4a3e4f8484e6ab4.zip |
Improve SyncMirrors logging (#19045)
Yet another issue has come up where the logging from SyncMirrors does not provide
enough context. This PR adds more context to these logging events.
Related #19038
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'models')
-rw-r--r-- | models/lfs.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/models/lfs.go b/models/lfs.go index e0c16767f7..037ed8556b 100644 --- a/models/lfs.go +++ b/models/lfs.go @@ -193,12 +193,13 @@ func LFSAutoAssociate(metas []*LFSMetaObject, user *user_model.User, repoID int6 // admin can associate any LFS object to any repository, and we do not care about errors (eg: duplicated unique key), // even if error occurs, it won't hurt users and won't make things worse for i := range metas { + p := lfs.Pointer{Oid: metas[i].Oid, Size: metas[i].Size} _, err = sess.Insert(&LFSMetaObject{ - Pointer: lfs.Pointer{Oid: metas[i].Oid, Size: metas[i].Size}, + Pointer: p, RepositoryID: repoID, }) if err != nil { - log.Warn("failed to insert LFS meta object into database, err=%v", err) + log.Warn("failed to insert LFS meta object %-v for repo_id: %d into database, err=%v", p, repoID, err) } } } |