Skip to content

Commit

Permalink
fix(log): trimmed error level logs (project-zot#2115)
Browse files Browse the repository at this point in the history
Signed-off-by: Andreea-Lupu <[email protected]>
  • Loading branch information
Andreea-Lupu authored Dec 5, 2023
1 parent 2e733b3 commit e3bd9a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/extensions/sync/references/references.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions pkg/storage/imagestore/imagestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit e3bd9a8

Please sign in to comment.