Skip to content

Commit

Permalink
cli: set default slog log level to "warn"
Browse files Browse the repository at this point in the history
  • Loading branch information
malt3 committed Jan 2, 2024
1 parent d6a37f5 commit e21be9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
func newCLILogger(cmd *cobra.Command) (*slog.Logger, error) {
rawLogLevel, err := cmd.Flags().GetString("log-level")
if err != nil {
rawLogLevel = "info"
rawLogLevel = "warn"
}
var level slog.Level
switch strings.ToLower(rawLogLevel) {
Expand Down
2 changes: 1 addition & 1 deletion cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func newRootCmd() *cobra.Command {
}
cmd.SetOut(os.Stdout)

cmd.PersistentFlags().String("log-level", "info", "set logging level (debug, info, warn, error, or a number)")
cmd.PersistentFlags().String("log-level", "warn", "set logging level (debug, info, warn, error, or a number)")

cmd.InitDefaultVersionFlag()
cmd.AddCommand(
Expand Down

0 comments on commit e21be9b

Please sign in to comment.