Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add verbose logging support for debugging #50

Closed
kennethreitz opened this issue May 28, 2011 · 3 comments
Closed

Add verbose logging support for debugging #50

kennethreitz opened this issue May 28, 2011 · 3 comments
Assignees
Milestone

Comments

@kennethreitz
Copy link
Contributor

>>> requests.settings.log = True
# Logs all HTTP Traffic to stderr

>>> requests.settings.log = steam_like_object
# Logs all HTTP Traffic to given stream

>>> requests.settings.log = False
# [Default] No HTTP Logging
@ghost ghost assigned kennethreitz May 28, 2011
@kennethreitz
Copy link
Contributor Author

Done.

@fletom
Copy link

fletom commented Feb 13, 2012

I can't find any documentation on this and it doesn't work for me, even after pip installing right from GitHub:

In [9]: import requests

In [10]: requests.settings.log = True
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/Users/fletcher/Work/Current/twrss/<ipython-input-10-e3570368ba7d> in <module>()
----> 1 requests.settings.log = True

AttributeError: 'module' object has no attribute 'settings'

In [11]: requests.__version__
Out[11]: '0.10.2'

What am I doing wrong?

@jaimeirurzun
Copy link

Same here with current HEAD:

>>> import requests
>>> requests.settings.log = True
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'settings'
>>> requests.__version__
'0.12.01'

Also, I can only find a couple of mentions to settings:

$ grep -rnsI settings lib/python2.6/site-packages/requests/*
lib/python2.6/site-packages/requests/models.py:186:            # Pass settings over.
lib/python2.6/site-packages/requests/sessions.py:7:This module provides a Session object to manage and persist settings across

Has this been removed after closing this issue or something?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants