Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Feature Request: Implement Request Logging Options #141

Copy link
Copy link
@LaikaN57

Description

@LaikaN57
Issue body actions

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

  1. Natively create a logging.Logger object.
  2. Switch to using urllib3 instead of urllib as it has a logging.Logger which can be configured.
  3. Add an option to be able to pass a custom urllib.requests.OpenerDirector or similar.
  4. A workaround I found was setting http.client.HTTPConnection.debuglevel = 1 but 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

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.