diff --git a/pkg/agent/sidecar/service/observer/observer.go b/pkg/agent/sidecar/service/observer/observer.go index a9204f35c8..f5ed32d553 100644 --- a/pkg/agent/sidecar/service/observer/observer.go +++ b/pkg/agent/sidecar/service/observer/observer.go @@ -153,7 +153,7 @@ func (o *observer) PostStop(ctx context.Context) (err error) { backup := func() error { metadata, err := metadata.Load(o.metadataPath) if err != nil { - log.Warn("cannot read metadata of the backup files") + log.Warn("cannot read metadata of the backup files:", err) return err } @@ -248,7 +248,7 @@ func (o *observer) startTicker(ctx context.Context) (<-chan error, error) { case <-ct.C: metadata, err := metadata.Load(o.metadataPath) if err != nil { - log.Warn("cannot read metadata of the backup files") + log.Warn("cannot read metadata of the backup files:", err) ech <- err continue } @@ -326,7 +326,7 @@ func (o *observer) onWrite(ctx context.Context, name string) error { ok, err := o.isValidMetadata() if err != nil { - log.Warn("cannot read metadata of the backup files") + log.Warn("cannot read metadata of the backup files:", err) return err } @@ -351,7 +351,7 @@ func (o *observer) onCreate(ctx context.Context, name string) error { ok, err := o.isValidMetadata() if err != nil { - log.Warn("cannot read metadata of the backup files") + log.Warn("cannot read metadata of the backup files:", err) return err }