Log user info in auth_token middleware

Add logging for user information (like user name, tenant_id, roles) in
the auth_token middleware. This would make tracking down issues much
easier.

Change-Id: Ife4ce29d2f8e1a338a025dda4afbd7b563f6b8c1
Implements: blueprint user-info-logging-in-auth-token-middleware
This commit is contained in:
AmalaBasha
2013-09-03 15:51:59 +05:30
parent d6eb5021ed
commit d40a9f4f6e

View File

@@ -900,6 +900,9 @@ class AuthProtocol(object):
'X-Role': roles,
}
self.LOG.debug("Received request from user: %s with project_id : %s"
" and roles: %s ", user_id, project_id, roles)
try:
catalog = catalog_root[catalog_key]
rval['X-Service-Catalog'] = jsonutils.dumps(catalog)