Skip to content

Commit

Permalink
fix createSnapshot/ restoreSnapshot logs
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendanCoughlan5 committed Feb 6, 2025
1 parent 5a456a8 commit 3929046
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/createSnapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
"go.uber.org/zap"
)

var createSnapshotCmd = &cobra.Command{
Expand Down Expand Up @@ -38,7 +39,7 @@ var createSnapshotCmd = &cobra.Command{
}

if err := svc.CreateSnapshot(); err != nil {
return fmt.Errorf("failed to create snapshot: %w", err)
l.Sugar().Fatal("failed to create snapshot", zap.Error(err))
}

return nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/restoreSnapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Follow the snapshot docs if you need to convert the snapshot to a different sche
}

if err := svc.RestoreSnapshot(); err != nil {
l.Fatal("failed to restore snapshot", zap.Error(err))
l.Sugar().Fatal("failed to restore snapshot", zap.Error(err))
}

return nil
Expand Down

0 comments on commit 3929046

Please sign in to comment.