-
Notifications
You must be signed in to change notification settings - Fork 76
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
How to enable .debug in WebRequestManager? #25
Comments
This seems to work: import stackexchange
so = stackexchange.Site(stackexchange.StackOverflow)
stackexchange.web.WebRequestManager.debug = True
... do some stackexchange things here... -- but requires code diving as it's not part of any published interface -- and operates globally across all API requests. |
I've added a FAQ entry suggesting the technique shown above. |
Thanks a lot; that is indeed the way I have usually enabled it, or through similar code in a REPL session. I hadn't previously considered it as useful for anything but library debugging, but I suppose it could also be useful for application debugging. Per #24 you opened, I think you are right in that it should be migrated to use the logging module, probably with a logger instance per site. |
It all depends on your roadmap -- as far as I'm concerned, if I expect to use this in a server environment as part of a real app, I'll want proper, configurable logging facilities. You're the architect, so I'll let you take the lead (especially on #24) but once that starts, I'll jump in as appropriate. |
WebRequestManager
has adebug
field, which is initialized toFalse
. I see no way to set it ==True
sans code hacking or class attribute manipulation. Have I missed something?The text was updated successfully, but these errors were encountered: