oink
oink copied to clipboard
Oink and serving assets
Would it be possible to filter out oink logging when Rails is serving assets (in development)?
It currently spams my logs like this (asset logging itself is being silenced, otherwise those requests would show up):
Feb 07 12:36:18 zephyr rails[2941]: Memory usage: 2658288 | PID: 2941
Feb 07 12:36:18 zephyr rails[2941]: Oink Log Entry Complete
Feb 07 12:36:18 zephyr rails[2941]: Memory usage: 2658288 | PID: 2941
Feb 07 12:36:18 zephyr rails[2941]: Oink Log Entry Complete
Feb 07 12:36:18 zephyr rails[2941]: Memory usage: 2658288 | PID: 2941
Feb 07 12:36:18 zephyr rails[2941]: Oink Log Entry Complete
Feb 07 12:36:18 zephyr rails[2941]: Memory usage: 2658288 | PID: 2941
...
Since Oink is executed in Rack Middleware, an approach like this might be a good way to go:
http://icelab.com.au/articles/wrapping-rack-middleware-to-exclude-certain-urls-for-rails-streaming-responses/
Happy to accept a patch that works similarly to this for Oink's middleware.
Any progress with this?
Seems like this is basically a development-only kind of issue. Are you making use of Oink in development? If not would just suggest turning oink off entirely in development mode. Otherwise, not sure -- you could wrap the oink middleware in your own to exclude assets.
Just fyi, we're no longer using Oink in development.