Log warning message when current user is freeze (#18937)

Signed-off-by: stonezdj <daojunz@vmware.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
stonezdj(Daojun Zhang) 2023-07-18 15:34:28 +08:00 committed by GitHub
parent d745ad9175
commit 82ee5295ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,7 @@ func Login(ctx context.Context, m models.AuthModel) (*models.User, error) {
user, err := authenticator.Authenticate(ctx, m) user, err := authenticator.Authenticate(ctx, m)
if err != nil { if err != nil {
if _, ok = err.(ErrAuth); ok { if _, ok = err.(ErrAuth); ok {
log.Debugf("Login failed, locking %s, and sleep for %v", m.Principal, frozenTime) log.Warningf("Login failed, locking %s, and sleep for %v", m.Principal, frozenTime)
lock.Lock(m.Principal) lock.Lock(m.Principal)
time.Sleep(frozenTime) time.Sleep(frozenTime)
} }