我正在使用 ruby gem rest-client和rest-client-components。
Rest-client-components 使用 Rack::CommonLogger 启用请求日志记录。
启用它的说明使用 STDOUT:
require 'restclient/components'
RestClient.enable Rack::CommonLogger, STDOUT
这在开发中运行良好,但是当我使用 Apache/Passenger (mod_rails) 进行生产时,我在 production.log 中看不到来自 rest-client 的任何消息。有没有办法将 Rack::CommonLogger 与 Rails 日志集成?或者至少将其写入文件?前者更有用,因为它很容易看到上下文,但后者总比没有好。
谢谢。