Python 如何使用chalice打印完整的http请求?

Python 如何使用chalice打印完整的http请求?,python,rest,aws-lambda,chalice,Python,Rest,Aws Lambda,Chalice,我有一个小应用程序,我正在使用chalice公开一些端点。出于日志记录的目的,我希望在调用任何处理程序函数时打印整个url @app.route('/XYZ', methods=['GET']) @logging_and_error_handling() def get_XYZ_value(): 例如,如果调用上述函数,我想使用app.log.info()记录整个url。 类似于调用http://myhostname.com/api/XYZ 已启动 我尝试使用app.current\u req

我有一个小应用程序,我正在使用chalice公开一些端点。出于日志记录的目的,我希望在调用任何处理程序函数时打印整个url

@app.route('/XYZ', methods=['GET'])
@logging_and_error_handling()
def get_XYZ_value():
例如,如果调用上述函数,我想使用
app.log.info()
记录整个url。 类似于调用http://myhostname.com/api/XYZ 已启动

我尝试使用app.current\u request.to\u dict(),但它似乎没有该信息


是否有其他方法可以实现此目的?

我使用
app.current\u request.context['resourcePath']
作为URL,并记录以下内容:

  • app.current\u请求方法
  • app.current\u request.uri\u params
  • app.current\u request.query\u params
  • app.current\u request.context.get('requestId')

我使用
app.current\u request.context['resourcePath']
作为URL,并记录以下内容:

  • app.current\u请求方法
  • app.current\u request.uri\u params
  • app.current\u request.query\u params
  • app.current\u request.context.get('requestId')