开发者

Don't log asset requests in Rails 3.1 in development mode [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicate:

How to disable logging of asset pipeline (sprockets) messages in Rails 3.1?

Since enabling the asset pipeline my development log is full of things like:

Started GET "开发者_高级运维/assets/icons/close_32.png" for 127.0.0.1 at 2011-09-19 11:05:39 +0100
Started GET "/assets/vendor/colorbox/controls.png" for 127.0.0.1 at 2011-09-19 11:05:39 +0100
Served asset /icons/close_32.png - 304 Not Modified (0ms)
Served asset /vendor/colorbox/controls.png - 304 Not Modified (0ms)

This means that getting to the actual request in a log requires a lot of scrolling. I very rarely, if ever, care about these asset requests in my log so is there a way to disable logging for the asset requests?


Sometime in the future

config.assets.logger = nil

will be available, but for now try using grep to exclude everything related to assets.


As Philip mentions

config.assets.logger = nil

It's still in Master so it's not implemented as of yet.

But in the meantime you can use

config.assets.debug = false

It still won't get you all the way but it will not output as much log messages. Makes it a bit cleaner...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜