Skip to content

Commit

Permalink
chore: add debug messages
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed Jan 17, 2025
1 parent e3a827b commit ec124bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/fanal/artifact/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ func (a Artifact) imageSize(ctx context.Context, diffIDs []string) (int64, error
}

func (a Artifact) saveLayer(diffID string) (int64, error) {
a.logger.Debug("Pulling the layer to the local cache", log.String("diff_id", diffID))
_, rc, err := a.uncompressedLayer(diffID)
if err != nil {
return -1, xerrors.Errorf("unable to get uncompressed layer %s: %w", diffID, err)
Expand Down Expand Up @@ -482,6 +483,7 @@ func (a Artifact) uncompressedLayer(diffID string) (string, io.ReadCloser, error

f, err := os.Open(filepath.Join(a.layerCacheDir, diffID))
if err == nil {
a.logger.Debug("Loaded the layer from the local cache", log.String("diff_id", diffID))
return digest, f, nil
}

Expand Down

0 comments on commit ec124bd

Please sign in to comment.