I'd like to debug the request my Rails app makes with RestClient. The RestClient docs say:
To enable logging you can
set RestClient.log with a ruby Logger or set an environment variable to avoid modifying the code (in this case you can use a file name, “stdout” or “stderr”):
$ RESTCLIENT_LOG=stdout path/to/my/program Either produces logs like this:
RestClient.get "http://some/resource"
=> 200 OK | text/html 250 bytes
RestClient.put "http://some/resource", "payload"
=> 401 Unauthorized | application/xml 340 bytes
Note that these logs are valid Ruby, so you can paste them into the restclient shell or a >script to replay your sequence of rest calls.
How do I do get these logs included in my Rails apps log folder?