slumber
slumber copied to clipboard
added logging to HTTP errors w/ url, status and response content
This change adds a "slumber" logger and uses it to emit ERROR level messages w/ the URL, HTTP Status and response content in the event of an HTTP error. This should make it easier to debug server errors on the client side.
I believe this will also satisfy #68 and #17.
Thanks for this! I’m not sure if error is the right level though; for production servers that could be too much logging. What about debug? /cc @hadrien @pior
I'm fine using whatever log level you deem appropriate. Obviously an easy change. :)
@merwok I agree with the error level. There is a "slumber" logger, so it's configurable.
OK for the null handler.
@pior: are you saying you agree with the proposed error level?