Commit cdde84b8 by Oleksandr Barabash

logger updated

parent 582b1db9
...@@ -20,7 +20,8 @@ class Log(object): ...@@ -20,7 +20,8 @@ class Log(object):
LEVEL = logging.DEBUG LEVEL = logging.DEBUG
logger = logging.getLogger() logger = logging.getLogger()
logging_config = {"format": "%(asctime)-23s %(levelname)8s: %(message)s", logging_config = {"format": "%(asctime)-23s %(levelname)8s "
"%(module)s %(funcName)s: %(message)s",
"level": logging.DEBUG} "level": logging.DEBUG}
logging.basicConfig(**logging_config) logging.basicConfig(**logging_config)
......
...@@ -146,6 +146,9 @@ class TokenHelper: ...@@ -146,6 +146,9 @@ class TokenHelper:
a_type, a_value = parse_auth_header( a_type, a_value = parse_auth_header(
request.headers.get("Authorization") request.headers.get("Authorization")
) )
Log.i(__name__, "auth_headers:: headers: "
"'{}'".format(request.headers))
Log.i(__name__, "auth_headers:: type: '{}'".format(a_type))
if a_type == Auth.TYPE and self.is_token_valid(a_value): if a_type == Auth.TYPE and self.is_token_valid(a_value):
return await f(request) return await f(request)
return Response(status=HTTPStatus.FORBIDDEN) return Response(status=HTTPStatus.FORBIDDEN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment