improved logging for all responses
This commit is contained in:
parent
03d1af16e7
commit
c2fe2b5e03
|
@ -20,7 +20,13 @@ def log_status_code(r, *args, **kwargs):
|
||||||
:param kwargs:
|
:param kwargs:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
log_data = {
|
||||||
|
"reason": (r.reason if r.reason else ""),
|
||||||
|
"status_code": r.status_code,
|
||||||
|
"url": (r.url if r.url else ""),
|
||||||
|
}
|
||||||
metrics.send(f"entrust_status_code_{r.status_code}", "counter", 1)
|
metrics.send(f"entrust_status_code_{r.status_code}", "counter", 1)
|
||||||
|
current_app.logger.info(log_data)
|
||||||
|
|
||||||
|
|
||||||
def determine_end_date(end_date):
|
def determine_end_date(end_date):
|
||||||
|
|
Loading…
Reference in New Issue