From af0052e36cb1331c6314c050423a96dad884ebcd Mon Sep 17 00:00:00 2001 From: Sebastian Choren Date: Mon, 2 Sep 2024 15:36:40 -0300 Subject: [PATCH] fix --- cli/cmdutil/logger.go | 2 +- cli/config/configurator.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/cmdutil/logger.go b/cli/cmdutil/logger.go index 30d2526ba0..001f9723a8 100644 --- a/cli/cmdutil/logger.go +++ b/cli/cmdutil/logger.go @@ -29,7 +29,7 @@ func GetLogger(opts ...loggerOption) *zap.Logger { if loggerConfig.Verbose { atom.SetLevel(zap.DebugLevel) } else { - return zap.NewNop() + atom.SetLevel(zap.WarnLevel) } encoderCfg := zapcore.EncoderConfig{ diff --git a/cli/config/configurator.go b/cli/config/configurator.go index 6e3cbfbd02..8015a8bfdd 100644 --- a/cli/config/configurator.go +++ b/cli/config/configurator.go @@ -117,7 +117,7 @@ func (c Configurator) Start(ctx context.Context, prev *Config, flags agentConfig _, err = c.handleOAuth(ctx, cfg, prev) if err != nil { - c.logger.Error("Could not handle OAuth", zap.Error(err)) + c.logger.Debug("Could not handle OAuth", zap.Error(err)) return err } @@ -265,7 +265,7 @@ func (c Configurator) handleOAuth(ctx context.Context, cfg Config, prev *Config) var err error cfg, err = c.exchangeToken(cfg, c.flags.Token) if err != nil { - c.logger.Error("Could not exchange token", zap.Error(err)) + c.logger.Debug("could not exchange token", zap.Error(err)) return Config{}, err } }