From e21be9bb68c63d580f3173c48bd64ac812743a43 Mon Sep 17 00:00:00 2001 From: Malte Poll <1780588+malt3@users.noreply.github.com> Date: Thu, 21 Dec 2023 15:55:09 +0100 Subject: [PATCH] cli: set default slog log level to "warn" --- cli/log.go | 2 +- cli/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/log.go b/cli/log.go index fd12fb5661..fe719b8648 100644 --- a/cli/log.go +++ b/cli/log.go @@ -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) { diff --git a/cli/main.go b/cli/main.go index b6d853febf..d08421b94c 100644 --- a/cli/main.go +++ b/cli/main.go @@ -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(