refactor: remove cometbft/libs/cli import (#15673)

This commit is contained in:
Julien Robert
2023-04-03 14:48:02 +00:00
committed by GitHub
parent f69fdad424
commit c1974e4b3c
21 changed files with 72 additions and 84 deletions
+2 -2
View File
@@ -3,7 +3,6 @@ package cmd
import (
"context"
cmtcfg "github.com/cometbft/cometbft/config"
cmtcli "github.com/cometbft/cometbft/libs/cli"
"github.com/rs/zerolog"
"github.com/spf13/cobra"
@@ -27,7 +26,8 @@ func Execute(rootCmd *cobra.Command, envPrefix, defaultHome string) error {
ctx := CreateExecuteContext(context.Background())
rootCmd.PersistentFlags().String(flags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)")
rootCmd.PersistentFlags().String(flags.FlagLogFormat, cmtcfg.LogFormatPlain, "The logging format (json|plain)")
// NOTE: The default logger is only checking for the "json" value, any other value will default to plain text.
rootCmd.PersistentFlags().String(flags.FlagLogFormat, "plain", "The logging format (json|plain)")
executor := cmtcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome)
return executor.ExecuteContext(ctx)