diff options
author | 6543 <6543@obermui.de> | 2021-06-25 18:54:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-25 17:54:08 +0100 |
commit | 3ef23d5411732b4b714d6fc9739bc5dac75aadd4 (patch) | |
tree | 46e34859fe8aff472da725a9b50d686d50167f3e /modules/git/last_commit_cache_gogit.go | |
parent | 44b8b07631666e3ae691149bdba31ca0f51569f5 (diff) | |
download | gitea-3ef23d5411732b4b714d6fc9739bc5dac75aadd4.tar.gz gitea-3ef23d5411732b4b714d6fc9739bc5dac75aadd4.zip |
Use gitea logging module for git module (#16243)
remove log() func from gogs times and switch to proper logging
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/git/last_commit_cache_gogit.go')
-rw-r--r-- | modules/git/last_commit_cache_gogit.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/git/last_commit_cache_gogit.go b/modules/git/last_commit_cache_gogit.go index 16fb1c988c..b8e0db46a9 100644 --- a/modules/git/last_commit_cache_gogit.go +++ b/modules/git/last_commit_cache_gogit.go @@ -10,6 +10,8 @@ import ( "context" "path" + "code.gitea.io/gitea/modules/log" + "github.com/go-git/go-git/v5/plumbing/object" cgobject "github.com/go-git/go-git/v5/plumbing/object/commitgraph" ) @@ -41,9 +43,9 @@ func NewLastCommitCache(repoPath string, gitRepo *Repository, ttl func() int64, func (c *LastCommitCache) Get(ref, entryPath string) (interface{}, error) { v := c.cache.Get(c.getCacheKey(c.repoPath, ref, entryPath)) if vs, ok := v.(string); ok { - log("LastCommitCache hit level 1: [%s:%s:%s]", ref, entryPath, vs) + log.Debug("LastCommitCache hit level 1: [%s:%s:%s]", ref, entryPath, vs) if commit, ok := c.commitCache[vs]; ok { - log("LastCommitCache hit level 2: [%s:%s:%s]", ref, entryPath, vs) + log.Debug("LastCommitCache hit level 2: [%s:%s:%s]", ref, entryPath, vs) return commit, nil } id, err := c.repo.ConvertToSHA1(vs) |