Skip to content

Instantly share code, notes, and snippets.

@davelyon
Created November 16, 2011 21:48
Show Gist options
  • Save davelyon/1371549 to your computer and use it in GitHub Desktop.
Save davelyon/1371549 to your computer and use it in GitHub Desktop.
Silence Asset Logging in Development
if Rails.env.development?
Rails.application.assets.logger = Logger.new('/dev/null')
Rails::Rack::Logger.class_eval do
def before_dispatch_with_quiet_assets(env)
before_dispatch_without_quiet_assets(env) unless env['PATH_INFO'].index("/assets/") == 0
end
alias_method_chain :before_dispatch, :quiet_assets
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment