[英]How can I log all HTTP requests to rails app in development mode?
I'd like to be able to log all http requests to a rails app, even those to static assets in the public folder. 我希望能够将所有http请求记录到Rails应用程序中,甚至也可以记录到公共文件夹中的静态资源中。 I'd like to do this with a standard rails setup, eg using ./script/server, and without installing Apache, etc.
我想使用标准的Rails设置来执行此操作,例如使用./script/server,而无需安装Apache等。
I tried wireshark, but it seems like it doesn't track local traffic. 我尝试了Wireshark,但似乎无法跟踪本地流量。 I also tried to use the request object, but that only knows about the request url, not the subsequent css+image+js assets.
我也尝试使用request对象,但这只知道请求url,而不知道随后的css + image + js资产。
I'm using Rails 2.3.4 on Mac OS 10.5. 我在Mac OS 10.5上使用Rails 2.3.4。 By the way, Yslow, etc. won't work for my setup (android development).
顺便说一句,Yslow等不适用于我的设置(Android开发)。
$ {RAILS_ROOT} /log/development.log不是enoug吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.