Skip to content

Instantly share code, notes, and snippets.

@coreindustries
Last active December 30, 2019 18:23
Show Gist options
  • Save coreindustries/088b66e58eef49128fdd4b2d46c4ec4d to your computer and use it in GitHub Desktop.
Save coreindustries/088b66e58eef49128fdd4b2d46c4ec4d to your computer and use it in GitHub Desktop.
Python: enable/disable urllib logging
from http.client import HTTPConnection
# enable/disable urllib logging
HTTPConnection.debuglevel = 0
requests_log = logging.getLogger("urllib3")
requests_log.setLevel(logging.INFO)
requests_log.propagate = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment