Unverified Commit 246adf95 authored by Cristian Maglie's avatar Cristian Maglie Committed by GitHub

Add '--log' global flag as alias for '-v' (#2258)

parent 1923ac41
......@@ -104,6 +104,8 @@ func createCliCommandTree(cmd *cobra.Command) {
cmd.AddCommand(feedback.NewCommand())
cmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, tr("Print the logs on the standard output."))
cmd.Flag("verbose").Hidden = true
cmd.PersistentFlags().BoolVar(&verbose, "log", false, tr("Print the logs on the standard output."))
validLogLevels := []string{"trace", "debug", "info", "warn", "error", "fatal", "panic"}
cmd.PersistentFlags().String("log-level", "", tr("Messages with this level and above will be logged. Valid levels are: %s", strings.Join(validLogLevels, ", ")))
cmd.RegisterFlagCompletionFunc("log-level", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment