From 3df7a1f067f5448b74512ef75291797daf10b268 Mon Sep 17 00:00:00 2001 From: Manu NALEPA Date: Mon, 4 Mar 2024 10:28:49 +0100 Subject: [PATCH] VC: Improve logging in case of fatal error (#13681) * VC: Display `FATAL` log in case of uncaught error. * `initializeFromCLI`: Remove `Println`. --- cmd/validator/main.go | 3 ++- validator/node/node.go | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/validator/main.go b/cmd/validator/main.go index 67568136d..5692f9ec6 100644 --- a/cmd/validator/main.go +++ b/cmd/validator/main.go @@ -127,7 +127,8 @@ func main() { Version: version.Version(), Action: func(ctx *cli.Context) error { if err := startNode(ctx); err != nil { - return cli.Exit(err.Error(), 1) + log.Fatal(err.Error()) + return err } return nil }, diff --git a/validator/node/node.go b/validator/node/node.go index 5a4f75be0..1d15f1f91 100644 --- a/validator/node/node.go +++ b/validator/node/node.go @@ -261,7 +261,6 @@ func (c *ValidatorClient) initializeFromCLI(cliCtx *cli.Context, router *mux.Rou if isWeb3SignerURLFlagSet { c.wallet = wallet.NewWalletForWeb3Signer() } else { - fmt.Println("initializeFromCLI asking for wallet") w, err := wallet.OpenWalletOrElseCli(cliCtx, func(cliCtx *cli.Context) (*wallet.Wallet, error) { return nil, wallet.ErrNoWalletFound })