diff --git a/internal/core/build_info.go b/internal/core/build_info.go index db94d72372..446a71d99a 100644 --- a/internal/core/build_info.go +++ b/internal/core/build_info.go @@ -64,7 +64,7 @@ func (b *BuildInfo) checkVersion() { } if b.Version.LessThan(latestVersion) { - logger.Infof("a new version of scw is available (%s), beware that you are currently running %v", latestVersion, b.Version) + logger.Warningf("a new version of scw is available (%s), beware that you are currently running %v", latestVersion, b.Version) } else { logger.Debugf("version is up to date (%s)", b.Version) } diff --git a/internal/core/cobra_utils.go b/internal/core/cobra_utils.go index 55d92054dd..5a669030c0 100644 --- a/internal/core/cobra_utils.go +++ b/internal/core/cobra_utils.go @@ -115,7 +115,7 @@ func cobraPreRunInitMeta(ctx context.Context, cmd *Command) func(cmd *cobra.Comm var err error meta := extractMeta(ctx) - logLevel := logger.LogLevelInfo + logLevel := logger.LogLevelWarning if meta.DebugModeFlag { logLevel = logger.LogLevelDebug // enable debug mode } diff --git a/internal/core/testdata/test-check-version-outdated-version.stderr.golden b/internal/core/testdata/test-check-version-outdated-version.stderr.golden index 7a44331f31..d550004ddc 100644 --- a/internal/core/testdata/test-check-version-outdated-version.stderr.golden +++ b/internal/core/testdata/test-check-version-outdated-version.stderr.golden @@ -1 +1 @@ -INFO: 2019/12/09 16:04:07 a new version of scw is available (2.0.0-alpha1), beware that you are currently running 1.20.0 +WARNING: 2019/12/09 16:04:07 a new version of scw is available (2.0.0-alpha1), beware that you are currently running 1.20.0 diff --git a/internal/core/validate.go b/internal/core/validate.go index 0265aaee87..ac6dd93829 100644 --- a/internal/core/validate.go +++ b/internal/core/validate.go @@ -38,7 +38,7 @@ func validateArgValues(cmd *Command, cmdArgs interface{}) error { fieldName = strings.ReplaceAll(fieldName, "."+mapSchema, "") fieldValue, fieldExists := getValueForFieldByName(cmdArgs, fieldName) if !fieldExists { - logger.Debugf("could not validate arg value for '%v': invalid fieldName: %v", argSpec.Name, fieldName) + logger.Infof("could not validate arg value for '%v': invalid fieldName: %v", argSpec.Name, fieldName) continue } validateFunc := DefaultArgSpecValidateFunc()