From 30edfd0b616bf5f9ad2f70ad7f44eda9e570e5b2 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 13 Mar 2023 14:03:22 +0100 Subject: [PATCH 1/3] chore: revert panic in simapp --- simapp/simd/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/simapp/simd/main.go b/simapp/simd/main.go index 4913650885c5..9890b4c0b0d5 100644 --- a/simapp/simd/main.go +++ b/simapp/simd/main.go @@ -1,6 +1,9 @@ package main import ( + "os" + + "cosmossdk.io/log" "cosmossdk.io/simapp" "cosmossdk.io/simapp/simd/cmd" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" @@ -9,6 +12,7 @@ import ( func main() { rootCmd := cmd.NewRootCmd() if err := svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome); err != nil { - panic(err) + log.NewLogger(rootCmd.OutOrStderr()).Error("failure when running app", "err", err) + os.Exit(1) } } From 8aed62acceed961e1723fe68eed3b4dbe445499b Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 13 Mar 2023 14:04:42 +0100 Subject: [PATCH 2/3] typo --- simapp/simd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simapp/simd/main.go b/simapp/simd/main.go index 9890b4c0b0d5..6f8516a7a12d 100644 --- a/simapp/simd/main.go +++ b/simapp/simd/main.go @@ -12,7 +12,7 @@ import ( func main() { rootCmd := cmd.NewRootCmd() if err := svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome); err != nil { - log.NewLogger(rootCmd.OutOrStderr()).Error("failure when running app", "err", err) + log.NewLogger(rootCmd.OutOrStdout()).Error("failure when running app", "err", err) os.Exit(1) } } From c9398f22881db362ee04c67fa40728ceaebfc6bb Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 13 Mar 2023 15:21:40 +0100 Subject: [PATCH 3/3] change to sdterr --- simapp/simd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simapp/simd/main.go b/simapp/simd/main.go index 6f8516a7a12d..9890b4c0b0d5 100644 --- a/simapp/simd/main.go +++ b/simapp/simd/main.go @@ -12,7 +12,7 @@ import ( func main() { rootCmd := cmd.NewRootCmd() if err := svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome); err != nil { - log.NewLogger(rootCmd.OutOrStdout()).Error("failure when running app", "err", err) + log.NewLogger(rootCmd.OutOrStderr()).Error("failure when running app", "err", err) os.Exit(1) } }