-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
type: community enhancementfeature request not on Twilio's roadmapfeature request not on Twilio's roadmap
Description
Issue Summary
We should implement request logging. SendGrid support will frequent want this information when helping customers debug their application. This information should include what API they are calling, what response code, and what error message we get back.
Possible Solutions
- Natively create a
logging.Loggerobject. - Switch to using
urllib3instead ofurllibas it has alogging.Loggerwhich can be configured. - Add an option to be able to pass a custom
urllib.requests.OpenerDirectoror similar. - A workaround I found was setting
http.client.HTTPConnection.debuglevel = 1but this did not seem to work for me in an AWS lambda environment. (I still need to investigate if there is an issue with my code on this though.)
I welcome feedback and would like to know if the community has any objections to adding dependencies (option 1) or changing dependencies (option 2) as I think these are the simplest methods.
Technical details:
- python-http-client version: 3.2.7
- python version: 3.7.8
LaikaN57
Metadata
Metadata
Assignees
Labels
type: community enhancementfeature request not on Twilio's roadmapfeature request not on Twilio's roadmap