KeenClient-Python
KeenClient-Python copied to clipboard
Add a debug mode
Mostly more verbose logging. Open to other suggestions for debug mode as well.
@josephwegner Can you give a (brief) example of the kind of thing that would be useful here?
Off the top of my head, a few things might be handy:
- Pretty-printing the JSON for request and response payloads
- More verbose logging of errors beyond what's in the Error string when an Error is raised
- Dump URLs and headers. Right now, the Error object tends to have the error code and message returned from the server, but in DEBUG mode we could also write detailed info to a given logger.
- Log class/function/args in verbose mode to see data flow through call paths where maybe and Error doesn't get raised, but should have or some other strange behavior is occurring.
- Dump keys? (potentially only if an env var or something is set to be super careful about not having this on by default for obvious reasons).