KeenClient-Python icon indicating copy to clipboard operation
KeenClient-Python copied to clipboard

Add a debug mode

Open josephwegner opened this issue 8 years ago • 2 comments

Mostly more verbose logging. Open to other suggestions for debug mode as well.

josephwegner avatar Jan 19 '17 20:01 josephwegner

@josephwegner Can you give a (brief) example of the kind of thing that would be useful here?

BlackVegetable avatar Sep 12 '17 19:09 BlackVegetable

Off the top of my head, a few things might be handy:

  1. Pretty-printing the JSON for request and response payloads
  2. More verbose logging of errors beyond what's in the Error string when an Error is raised
  3. 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.
  4. 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.
  5. 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).

masojus avatar Sep 20 '17 16:09 masojus