Support debug logging for client/CLI

Bug #1666734 reported by Jim Baker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Craton's Python Client
New
High
Unassigned

Bug Description

It should be feasible to turn on (and subsequently off) debug logging for the client. The most important debugging is presumably http, but we may have other debugging support that we would want to enable in the future.

The following options should be available to do this setup. The order is in terms of override: a CLI option overrides the env var CRATON_DEBUG, etc.

1. environment variable: CRATON_DEBUG=all|http|none # this can be a list of options; all implies all of them!
2. CLI option: --debug=all|none|http
3. cratonclient.v1.client.Client.debug(*options) # supports dynamic turning on/off; and is used by the above for actual implementation

To support http debugging, we can set up logging for the underlying requests and its libraries:

http://stackoverflow.com/questions/10588644/how-can-i-see-the-entire-http-request-thats-being-sent-by-my-python-application

Jim Baker (jimbaker)
Changed in python-cratonclient:
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.