Add log_level CLI flag back (#7789)
This commit is contained in:
parent
30efa5ab16
commit
854430e617
|
@ -76,6 +76,7 @@ func InterceptConfigsPreRunHandler(cmd *cobra.Command) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
basename := path.Base(executableName)
|
||||
|
||||
// Configure the viper instance
|
||||
|
|
|
@ -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 <module>:<level>,...")
|
||||
|
||||
executor := tmcli.PrepareBaseCmd(rootCmd, "", simapp.DefaultNodeHome)
|
||||
return executor.ExecuteContext(ctx)
|
||||
|
|
Loading…
Reference in New Issue