Skip to content

Commit ba12c0a

Browse files
committed
when reporting logging messages for prune targets, correctly report the target URL
Signed-off-by: Avi Deitcher <[email protected]>
1 parent 456aa24 commit ba12c0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/core/prune.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (e *Executor) Prune(ctx context.Context, opts PruneOptions) error {
4545

4646
for _, target := range opts.Targets {
4747
if err := pruneTarget(tracerCtx, logger, target, now, retainHours, retainCount); err != nil {
48-
return fmt.Errorf("failed to prune target %s: %v", target, err)
48+
return fmt.Errorf("failed to prune target %s: %v", target.URL(), err)
4949
}
5050
}
5151

@@ -141,7 +141,7 @@ func pruneTarget(ctx context.Context, logger *logrus.Entry, target storage.Stora
141141
}
142142
pruned++
143143
}
144-
logger.Debugf("pruning %d files from target %s", pruned, target)
144+
logger.Debugf("pruning %d files from target %s", pruned, target.URL())
145145
span.SetStatus(codes.Ok, fmt.Sprintf("pruned %d files", pruned))
146146
return nil
147147
}

0 commit comments

Comments
 (0)