From e3bd9a8fa86fc6674482d6a012a9e638137c2439 Mon Sep 17 00:00:00 2001 From: Andreea Lupu <58118008+Andreea-Lupu@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:01:01 +0200 Subject: [PATCH] fix(log): trimmed error level logs (#2115) Signed-off-by: Andreea-Lupu --- pkg/extensions/sync/references/references.go | 4 ++-- pkg/storage/imagestore/imagestore.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/extensions/sync/references/references.go b/pkg/extensions/sync/references/references.go index c1e5bcb0a..1750d8ffc 100644 --- a/pkg/extensions/sync/references/references.go +++ b/pkg/extensions/sync/references/references.go @@ -80,7 +80,7 @@ func (refs References) syncAll(ctx context.Context, localRepo, upstreamRepo, for _, ref := range refs.referenceList { syncedRefsDigests, err = ref.SyncReferences(ctx, localRepo, upstreamRepo, subjectDigestStr) if err != nil { - refs.log.Error().Err(err). + refs.log.Debug().Err(err). Str("reference type", ref.Name()). Str("image", fmt.Sprintf("%s:%s", upstreamRepo, subjectDigestStr)). Msg("couldn't sync image referrer") @@ -109,7 +109,7 @@ func (refs References) SyncReference(ctx context.Context, localRepo, upstreamRep if ref.Name() == referenceType { syncedRefsDigests, err = ref.SyncReferences(ctx, localRepo, upstreamRepo, subjectDigestStr) if err != nil { - refs.log.Error().Err(err). + refs.log.Debug().Err(err). Str("reference type", ref.Name()). Str("image", fmt.Sprintf("%s:%s", upstreamRepo, subjectDigestStr)). Msg("couldn't sync image referrer") diff --git a/pkg/storage/imagestore/imagestore.go b/pkg/storage/imagestore/imagestore.go index a84eb4447..57163c1e0 100644 --- a/pkg/storage/imagestore/imagestore.go +++ b/pkg/storage/imagestore/imagestore.go @@ -1325,7 +1325,7 @@ func (is *ImageStore) GetBlobPartial(repo string, digest godigest.Digest, mediaT // Check blobs in cache blobPath, err = is.checkCacheBlob(digest) if err != nil { - is.log.Error().Err(err).Str("digest", digest.String()).Msg("cache: not found") + is.log.Debug().Err(err).Str("digest", digest.String()).Msg("cache: not found") return nil, -1, -1, zerr.ErrBlobNotFound } @@ -1395,7 +1395,7 @@ func (is *ImageStore) GetBlob(repo string, digest godigest.Digest, mediaType str // Check blobs in cache dstRecord, err := is.checkCacheBlob(digest) if err != nil { - is.log.Error().Err(err).Str("digest", digest.String()).Msg("cache: not found") + is.log.Debug().Err(err).Str("digest", digest.String()).Msg("cache: not found") return nil, -1, zerr.ErrBlobNotFound } @@ -1448,7 +1448,7 @@ func (is *ImageStore) GetBlobContent(repo string, digest godigest.Digest) ([]byt // Check blobs in cache dstRecord, err := is.checkCacheBlob(digest) if err != nil { - is.log.Error().Err(err).Str("digest", digest.String()).Msg("cache: not found") + is.log.Debug().Err(err).Str("digest", digest.String()).Msg("cache: not found") return nil, zerr.ErrBlobNotFound }