mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 19:06:18 +01:00 
			
		
		
		
	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>
This commit is contained in:
		| @@ -10,6 +10,8 @@ import ( | ||||
| 	"bufio" | ||||
| 	"context" | ||||
| 	"path" | ||||
|  | ||||
| 	"code.gitea.io/gitea/modules/log" | ||||
| ) | ||||
|  | ||||
| // LastCommitCache represents a cache to store last commit | ||||
| @@ -39,9 +41,9 @@ func NewLastCommitCache(repoPath string, gitRepo *Repository, ttl func() int64, | ||||
| func (c *LastCommitCache) Get(ref, entryPath string, wr WriteCloserError, rd *bufio.Reader) (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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user