From 33fbaf7b4c915a3a8bec87d133948699c067937c Mon Sep 17 00:00:00 2001 From: Rintaro Okamura Date: Mon, 3 Aug 2020 12:37:50 +0900 Subject: [PATCH] :loud_sound: print err Signed-off-by: Rintaro Okamura --- pkg/agent/sidecar/service/observer/observer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 }