Skip to content

Commit e4e43a6

Browse files
committed
Add '--log' global flag as alias for '-v'
1 parent b678f6f commit e4e43a6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: internal/cli/cli.go

+2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ func createCliCommandTree(cmd *cobra.Command) {
104104
cmd.AddCommand(feedback.NewCommand())
105105

106106
cmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, tr("Print the logs on the standard output."))
107+
cmd.Flag("verbose").Hidden = true
108+
cmd.PersistentFlags().BoolVar(&verbose, "log", false, tr("Print the logs on the standard output."))
107109
validLogLevels := []string{"trace", "debug", "info", "warn", "error", "fatal", "panic"}
108110
cmd.PersistentFlags().String("log-level", "", tr("Messages with this level and above will be logged. Valid levels are: %s", strings.Join(validLogLevels, ", ")))
109111
cmd.RegisterFlagCompletionFunc("log-level", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {

0 commit comments

Comments
 (0)