mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
AuthN: Make logger less noisy (#76044)
* Change to debug for token needs rotation errors
This commit is contained in:
parent
6614eb0a6e
commit
81b366e2c8
@ -226,7 +226,12 @@ func (s *Service) authenticate(ctx context.Context, c authn.Client, r *authn.Req
|
||||
r.OrgID = orgIDFromRequest(r)
|
||||
identity, err := c.Authenticate(ctx, r)
|
||||
if err != nil {
|
||||
s.log.FromContext(ctx).Warn("Failed to authenticate request", "client", c.Name(), "error", err)
|
||||
log := s.log.FromContext(ctx).Warn
|
||||
if errors.Is(err, authn.ErrTokenNeedsRotation) {
|
||||
log = s.log.FromContext(ctx).Debug
|
||||
}
|
||||
|
||||
log("Failed to authenticate request", "client", c.Name(), "error", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user