Last active
December 30, 2019 18:23
-
-
Save coreindustries/088b66e58eef49128fdd4b2d46c4ec4d to your computer and use it in GitHub Desktop.
Python: enable/disable urllib logging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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