我想在Python App Engine上记录所有Google Cloud Endpoint请求。标准日志记录机制只记录请求的发生,而不记录数据或标头。
有没有可能自动记录这些数据,或者我必须坚持手动记录每个请求的数据?
发布于 2016-10-04 10:32:08
你可以这样做:
import logging
@endpoints.api(args)
class YourApi(remote.Service):
"""Your API
"""
@endpoints.method(args)
def a_method(self, request):
logging.info(request)https://stackoverflow.com/questions/35310112
复制相似问题