improved logging for all responses

This commit is contained in:
Hossein Shafagh 2020-10-22 16:00:26 -07:00
parent c2fe2b5e03
commit c60645bec4
1 changed files with 6 additions and 0 deletions

View File

@ -37,7 +37,13 @@ def log_status_code(r, *args, **kwargs):
:param kwargs:
:return:
"""
log_data = {
"reason": (r.reason if r.reason else ""),
"status_code": r.status_code,
"url": (r.url if r.url else ""),
}
metrics.send("digicert_status_code_{}".format(r.status_code), "counter", 1)
current_app.logger.info(log_data)
def signature_hash(signing_algorithm):