From 0b0882d456864a6155857f194740eb9fc55111bd Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Sat, 12 Oct 2024 15:26:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/paddle_services/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/paddle_services/utils.py b/services/paddle_services/utils.py index 4af6beb..2416e80 100644 --- a/services/paddle_services/utils.py +++ b/services/paddle_services/utils.py @@ -2,7 +2,7 @@ import logging import os from functools import wraps -from flask import jsonify +from flask import jsonify, request def process_request(func): @@ -12,8 +12,10 @@ def process_request(func): @wraps(func) def wrapper(*args, **kwargs): + logging.info(f'request {func.__name__} with args: {request.form}') try: result = func(*args, **kwargs) + logging.info(f'response {func.__name__} with result: {result}') return jsonify(result), 200 except Exception as e: logging.getLogger('error').error(e, exc_info=e)