Include params/request information in Rails logger?

前端 未结 3 1337
失恋的感觉
失恋的感觉 2020-12-24 08:51

I\'m trying to get some more information into my Rails logs, specifically the requested URI or current params, if available (and I appreciate that they won\'t always be). Ho

3条回答
  •  悲哀的现实
    2020-12-24 09:09

    you should look in the request class

    like puts request.uri.

    check here for more detail http://api.rubyonrails.org/classes/ActionController/AbstractRequest.html

提交回复
热议问题