diff --git a/server/util.go b/server/util.go index 3f66921d6..7118d5b8d 100644 --- a/server/util.go +++ b/server/util.go @@ -76,6 +76,7 @@ func InterceptConfigsPreRunHandler(cmd *cobra.Command) error { if err != nil { return err } + basename := path.Base(executableName) // Configure the viper instance diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index 2ffd39459..6fa3325c7 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -74,9 +74,12 @@ func Execute(rootCmd *cobra.Command) error { // and a Tendermint RPC. This requires the use of a pointer reference when // getting and setting the client.Context. Ideally, we utilize // https://github.com/spf13/cobra/pull/1118. + srvCtx := server.NewDefaultContext() ctx := context.Background() ctx = context.WithValue(ctx, client.ClientContextKey, &client.Context{}) - ctx = context.WithValue(ctx, server.ServerContextKey, server.NewDefaultContext()) + ctx = context.WithValue(ctx, server.ServerContextKey, srvCtx) + + rootCmd.PersistentFlags().String("log_level", srvCtx.Config.LogLevel, "The logging level in the format of :,...") executor := tmcli.PrepareBaseCmd(rootCmd, "", simapp.DefaultNodeHome) return executor.ExecuteContext(ctx)