jondkinney/docusign_rest — pull request #50 by bradleyjucsc (2014-11-13 01:47:20+00:00)
Title: Add logging to api calls

Log the uri and body (if it exists) for api requests. Log the response status and body.

To use (in rails), do the following in config/initializers/docusign_rest.rb:
```ruby
config.logger = Rails.logger
```

By default, the logger is set to ```ruby Logger.new('/dev/null') ```, which just does nothing.

Jon -

We have been using your gem very successfully for many months now, thanks for taking the time to open source your code.

When we started development on our docusign project, one of the things that docusign asked before they would "certify" us (or whatever they call it) is that we be able to capture the requests we make to them in the event that we report a bug. This PR doesn't fully meet their requirements (because they want the raw http request), but this gets very close, and is very useful for debugging regardless.

This code is not complete in the sense that there are still a few calls that go unlogged, but hopefully this will be useful despite that, and we can always do the rest of the calls later.

We only use a couple of calls in our app, so the majority of this changed code has not been tried in production.