diff --git a/pkg/build/gobuild.go b/pkg/build/gobuild.go index 2ff04b1265..cbd229d0b5 100644 --- a/pkg/build/gobuild.go +++ b/pkg/build/gobuild.go @@ -722,7 +722,7 @@ func (g *gobuild) buildOne(ctx context.Context, refStr string, base v1.Image, pl // Make typecheck below fail binaryLayer = nil } else { - log.Printf("Cached: %s for %s", ref.Path(), platformToString(*platform)) + log.Printf("Cache hit: %s for %s", ref.Path(), platformToString(*platform)) } } @@ -745,7 +745,9 @@ func (g *gobuild) buildOne(ctx context.Context, refStr string, base v1.Image, pl } if os.Getenv("KO_CACHE_META") != "" { if err := g.cacheLayerMeta(ctx, file, binaryLayer); err != nil { - log.Printf("failed to cache metadata for %s: %v", refStr, err) + log.Printf("failed to cache metadata for %s: %v", ref.Path(), err) + } else { + log.Printf("Cached %s for %s under %s", ref.Path(), platformToString(*platform), filepath.Dir(file)) } } }