Skip to content

Instantly share code, notes, and snippets.

@bcfurtado
Created December 10, 2019 09:44
Show Gist options
  • Save bcfurtado/053a79d63c44fe7810d75233e07daddb to your computer and use it in GitHub Desktop.
Save bcfurtado/053a79d63c44fe7810d75233e07daddb to your computer and use it in GitHub Desktop.
log all python requests
import http.client
import logging
http.client.HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment