Skip to content

Commit

Permalink
ensure default log level is set for all commands
Browse files Browse the repository at this point in the history
Set default log level early so tk complete (and any other commands that
don't read `--log-level`) won't print debug/trace level logs.
  • Loading branch information
rrotter committed Jun 7, 2024
1 parent 6e815e4 commit 4dc0755
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/tk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ func main() {
Version: tanka.CurrentVersion,
}

// set default logging level early; not all commands parse --log-level
zerolog.SetGlobalLevel(zerolog.InfoLevel)

// workflow commands
addCommandsWithLogLevelOption(
rootCmd,
Expand Down

0 comments on commit 4dc0755

Please sign in to comment.