From 8b648488b226a76e291292fd3387bc7c04b3f24c Mon Sep 17 00:00:00 2001 From: John Dennis Date: Thu, 14 Dec 2017 18:39:49 -0500 Subject: [PATCH] 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 --- keystonemiddleware/auth_token/_identity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keystonemiddleware/auth_token/_identity.py b/keystonemiddleware/auth_token/_identity.py index d02dcfc3..b7f2effe 100644 --- a/keystonemiddleware/auth_token/_identity.py +++ b/keystonemiddleware/auth_token/_identity.py @@ -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')