From 5f2ef17fdb7523398f1b84d8a1cad0f24b72667e Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 23 Jun 2021 22:41:39 +0100 Subject: [PATCH] Don't WARN log UserNotExist errors on ExternalUserLogin failure (#16238) Instead log these at debug - with warn logging for other errors. Fix #16235 Signed-off-by: Andrew Thornton --- models/login_source.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/models/login_source.go b/models/login_source.go index 098b48a8cd5..359b562b650 100644 --- a/models/login_source.go +++ b/models/login_source.go @@ -856,7 +856,11 @@ func UserSignIn(username, password string) (*User, error) { return authUser, nil } - log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err) + if IsErrUserNotExist(err) { + log.Debug("Failed to login '%s' via '%s': %v", username, source.Name, err) + } else { + log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err) + } } return nil, ErrUserNotExist{user.ID, user.Name, 0}