python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

更详细的调试日志

Open weakish opened this issue 5 years ago • 1 comments

现在调试日志用的是 requests (也就是 urllib3)的日志,只有 url 和 status code,没有 POST 请求的 body,也没有 http header。

顺便记录下 python 3 下如何开启完整日志:

import http.client
http.client.HTTPConnection.debuglevel=5

import logging
logging.basicConfig(level=logging.DEBUG)

import leancloud
# leancloud.init(...)

weakish avatar Apr 08 '20 10:04 weakish

但urllib3似乎是不是不怎么稳定,我运行着就出现socket.timeout: The read operation timed out

DAnGioi avatar Apr 09 '20 16:04 DAnGioi