Logging RestClient in a Rails app

前端 未结 5 1124
孤独总比滥情好
孤独总比滥情好 2021-01-18 08:47

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 w

5条回答
  •  南方客
    南方客 (楼主)
    2021-01-18 09:09

    This worked for me, running on RestClient 1.8 and Rails 4.2.1:

    ::RestClient.log = Rails.logger

提交回复
热议问题