update session log level (#17300)

To avoid too much noise in the core log, udpate the level to debug.

Signed-off-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
Wang Yan 2022-08-03 13:51:26 +08:00 committed by GitHub
parent 722d1a19ea
commit ebab99613f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,7 +139,7 @@ func (rp *Provider) SessionRegenerate(oldsid, sid string) (session.Store, error)
if !rp.SessionExist(oldsid) { if !rp.SessionExist(oldsid) {
err := rp.c.Save(ctx, sid, "", time.Duration(rp.maxlifetime)) err := rp.c.Save(ctx, sid, "", time.Duration(rp.maxlifetime))
if err != nil { if err != nil {
log.Warningf("failed to save sid=%s, where oldsid=%s, error: %s", sid, oldsid, err) log.Debugf("failed to save sid=%s, where oldsid=%s, error: %s", sid, oldsid, err)
} }
} else { } else {
if rdb, ok := rp.c.(*redis.Cache); ok { if rdb, ok := rp.c.(*redis.Cache); ok {
@ -155,11 +155,11 @@ func (rp *Provider) SessionRegenerate(oldsid, sid string) (session.Store, error)
err = rp.c.Delete(ctx, oldsid) err = rp.c.Delete(ctx, oldsid)
if err != nil { if err != nil {
log.Warningf("failed to delete oldsid=%s, error: %s", oldsid, err) log.Debugf("failed to delete oldsid=%s, error: %s", oldsid, err)
} }
err = rp.c.Save(ctx, sid, kv) err = rp.c.Save(ctx, sid, kv)
if err != nil { if err != nil {
log.Warningf("failed to save sid=%s, error: %s", sid, err) log.Debugf("failed to save sid=%s, error: %s", sid, err)
} }
} }
} }