8000 Add '--log' global flag as alias for '-v' (#2258) · arduino/arduino-cli@246adf9 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 246adf9

Browse files
authored
Add '--log' global flag as alias for '-v' (#2258)
1 parent 1923ac4 commit 246adf9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/cli/cli.go

Lines changed: 2 additions & 0 deletions
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)
0