Skip to content

fix: suppress urllib3 debug logging by default (closes #144)#146

Open
botbikamordehai2-sketch wants to merge 1 commit into
veox:masterfrom
botbikamordehai2-sketch:fix/issue-144-1779954045
Open

fix: suppress urllib3 debug logging by default (closes #144)#146
botbikamordehai2-sketch wants to merge 1 commit into
veox:masterfrom
botbikamordehai2-sketch:fix/issue-144-1779954045

Conversation

@botbikamordehai2-sketch
Copy link
Copy Markdown

What

When a user configures their application's root logger at DEBUG level, they unexpectedly receive DEBUG messages from urllib3 (used internally by requests) such as:

DEBUG: Starting new HTTPS connection (1): api.kraken.com:443
DEBUG: https://api.kraken.com:443 "GET /0/public/Time HTTP/1.1" 200 None

These messages originate from urllib3's own logger and propagate to the root logger, cluttering application logs.

Fix

Set the urllib3 logger level to WARNING in the API.__init__ method so that internal HTTP connection details are suppressed by default. Users who want these messages can re-enable them by adjusting logging.getLogger('urllib3').setLevel(logging.DEBUG) in their own code.

Closes #144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How to turn off debug level in krakenex / requests module?

1 participant