Log TokenNotFound at INFO level instead of WARNING
Token expiration is normal, however the client logs fill up with these
ominous WARNING messages:
WARNING keystonemiddleware.auth_token [-] Authorization failed for token
WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "Could not find token: 24ffb14540c74a7c964f9627fe2af8fb", "code": 404, "title": "Not Found"}}
It seems more useful to log normal events at a level less than WARNING,
this would reduce the log size but more importantly it will help
elminate the concerns raised when logs are filled with WARNING messages
that are otherwise benign.
Change-Id: I54ad6b5530ee81616bd4a44f8295985f5d84c2ee
Closes-Bug: #1738300
Signed-off-by: John Dennis <jdennis@redhat.com>
This commit is contained in:
committed by
Harry Rybacki
parent
a08bc44e04
commit
8b648488b2
@@ -220,8 +220,8 @@ class IdentityServer(object):
|
||||
user_token,
|
||||
allow_expired=allow_expired)
|
||||
except ksa_exceptions.NotFound as e:
|
||||
self._LOG.warning('Authorization failed for token')
|
||||
self._LOG.warning('Identity response: %s', e.response.text)
|
||||
self._LOG.info('Authorization failed for token')
|
||||
self._LOG.info('Identity response: %s', e.response.text)
|
||||
raise ksm_exceptions.InvalidToken(_('Token authorization failed'))
|
||||
except ksa_exceptions.Unauthorized as e:
|
||||
self._LOG.info('Identity server rejected authorization')
|
||||
|
||||
Reference in New Issue
Block a user