I would like to debug a request that a Rails application makes using RestClient . RestClient docs say:
To enable logging, you can
set RestClient.log using a ruby ββlogger or set an environment variable to avoid changing the code (in this case you can use the file name, "stdout" or "stderr"):
$ RESTCLIENT_LOG = path stdout / to / my / program Either logs are created:
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 a restclient or> script to reproduce a sequence of calls to rest.
How do I get these logs included in the Rails application log folder?
source share