Skip to content

Commit 03ee450

Browse files
author
Kazuyoshi Kato
committed
snapshot/devmapper: log exported methods correctly
- View was somehow logging itself as "prepare" - Cleanup should have its debug log as like other exported methods Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent c8c6eed commit 03ee450

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

snapshots/devmapper/snapshotter.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ func (s *Snapshotter) Prepare(ctx context.Context, key, parent string, opts ...s
204204

205205
// View creates readonly thin device for the given snapshot key
206206
func (s *Snapshotter) View(ctx context.Context, key, parent string, opts ...snapshots.Opt) ([]mount.Mount, error) {
207-
log.G(ctx).WithFields(logrus.Fields{"key": key, "parent": parent}).Debug("prepare")
207+
log.G(ctx).WithFields(logrus.Fields{"key": key, "parent": parent}).Debug("view")
208208

209209
var (
210210
mounts []mount.Mount
@@ -490,6 +490,8 @@ func (s *Snapshotter) withTransaction(ctx context.Context, writable bool, fn fun
490490

491491
// Cleanup cleans up all removed and unused resources
492492
func (s *Snapshotter) Cleanup(ctx context.Context) error {
493+
log.G(ctx).Debug("cleanup")
494+
493495
var removedDevices []*DeviceInfo
494496

495497
if !s.config.AsyncRemove {

0 commit comments

Comments
 (0)