sendgrid / sendgrid-python

The Official Twilio SendGrid Python API Library
https://sendgrid.com
MIT License
1.53k stars 711 forks source link

Feature Request: Implement Request Logging Options #927

Closed LaikaN57 closed 4 years ago

LaikaN57 commented 4 years ago

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.

I have created an issue with the underlying sendgrid/python_http_client repo, but also wanted to create one here as well in-case it was a more appropriate place to do so.

I welcome feedback and would like to know if the community has any objections to adding dependencies on the logging library.

Technical details:

LaikaN57 commented 4 years ago

If the upstream python_http_client package does not want to implement the feature we may also be able to do something similar to https://github.com/DataDog/datadog-lambda-layer-python/blob/master/datadog_lambda/patch.py#L58-L66

childish-sambino commented 4 years ago

Closing as I'm fine with the changes just going in python_http_client. Let's track it there.