def access_log_decorate(func):
    '\n    用于记录用户登录后访问网址行为的装饰器\n    :param func:\n    :return:\n    '

    @wraps(func)
    def wrapper(*args, **kwargs):
        access_user = request.headers.get('X-Real-IP ', request.remote_addr)
        access_method = request.method
        access_path = request.path
        access_time = timestamp_format(time.time())
        resp = func(*args, **kwargs)
        access_result = resp[0].get('status')
        access_message = (resp[0].get('message', 'Internal Server Error') if resp else 'Internal Server Error')
        SfoServerAccessLog.add_access_log(access_user, access_method, access_path, access_time, access_result, access_message)
        return resp
    return wrapper
用于记录用户登录后访问网址行为的装饰器
:param func:
:return:
def access_log_decorate(func):
    '\n    用于记录用户登录后访问网址行为的装饰器\n    :param func:\n    :return:\n    '

    @wraps(func)
    def wrapper(*args, **kwargs):
        access_user = request.headers.get('X-Real-IP ', request.remote_addr)
        access_method = request.method
        access_path = request.path
        access_time = timestamp_format(time.time())
        resp = func(*args, **kwargs)
        access_result = resp[0].get('status')
        access_message = (resp[0].get('message', 'Internal Server Error') if resp else 'Internal Server Error')
        SfoServerAccessLog.add_access_log(access_user, access_method, access_path, access_time, access_result, access_message)
        return resp
    return wrapper