From d3edb7ebd5efa0067fab39c6e2719e10ca4ef8ff Mon Sep 17 00:00:00 2001 From: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Date: Tue, 11 Oct 2022 12:59:00 -0300 Subject: [PATCH] fix(logging): convert missing cases to Zerolog EE-4400 (#7817) --- api/git/service.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/git/service.go b/api/git/service.go index a98c8984c..baf3a841d 100644 --- a/api/git/service.go +++ b/api/git/service.go @@ -2,12 +2,12 @@ package git import ( "context" - "log" "strings" "sync" "time" lru "github.com/hashicorp/golang-lru" + "github.com/rs/zerolog/log" ) var ( @@ -74,12 +74,12 @@ func newService(ctx context.Context, cacheSize int, cacheTTL time.Duration) *Ser var err error service.repoRefCache, err = lru.New(cacheSize) if err != nil { - log.Printf("[DEBUG] [git] [message: failed to create ref cache: %v\n", err) + log.Debug().Err(err).Msg("failed to create ref cache") } service.repoFileCache, err = lru.New(cacheSize) if err != nil { - log.Printf("[DEBUG] [git] [message: failed to create file cache: %v\n", err) + log.Debug().Err(err).Msg("failed to create file cache") } if cacheTTL > 0 {