Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6610407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:50:13+00:00 2026-05-25T19:50:13+00:00

Sprockets tends to be quite verbose in the (dev) log by default under Ruby

  • 0

Sprockets tends to be quite verbose in the (dev) log by default under Ruby on Rails 3.1 (RC1):

Started GET "/assets/application.css" for 127.0.0.1 at 2011-06-10 17:30:45 -0400
Compiled app/assets/stylesheets/application.css.scss  (5ms)  (pid 6303)


Started GET "/assets/application.js" for 127.0.0.1 at 2011-06-10 17:30:45 -0400
Compiled app/assets/stylesheets/default.css.scss  (15ms)  (pid 6303)

...
Started GET "/assets/default/header_bg.gif" for 127.0.0.1 at 2011-06-10 17:30:45 -0400
Served asset /default/header_logo.gif - 304 Not Modified  (7ms)  (pid 6303)
Served asset /default/header_bg.gif - 304 Not Modified  (0ms)  (pid 6246)
Served asset /default/footer_bg.gif - 304 Not Modified  (49ms)  (pid 6236)
...

I’d like to either reduce the level of verbosity or disable it altogether.

I’m assuming there is a clean way to disable or reduce the verbosity of the logging by adding a config line in either environment.rb or development.rb similar to config.active_record.logger = nil which silences ActiveRecord SQL statements.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:50:14+00:00Added an answer on May 25, 2026 at 7:50 pm

    Place the following code in config/initializers/quiet_assets.rb

    if Rails.env.development?
      Rails.application.assets.try(:logger=, Logger.new('/dev/null'))
      Rails::Rack::Logger.class_eval do
        def call_with_quiet_assets(env)
          previous_level = Rails.logger.level
          Rails.logger.level = Logger::ERROR if env['PATH_INFO'] =~ %r{^/assets/}
          call_without_quiet_assets(env)
        ensure
          Rails.logger.level = previous_level
        end
        alias_method_chain :call, :quiet_assets
      end
    end
    

    Updated: It now works for Ruby on Rails 3.2 too (previous attempt fixes before_dispatch, and now we’re going for the root rack call instead)

    Update: A proper Rack middleware solution (instead of fragile alias_method_chain) from @macournoyer https://github.com/rails/rails/issues/2639#issuecomment-6591735

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sprockets gem caches .erb files even though the ruby code in those might evaluate
I'm using Rails 3.1 and the sprockets stuff. I want to use ERB to
I'm trying to use these gists to get Sprockets 2.0beta to work with a
Possible Duplicate: How to disable logging of asset pipeline (sprockets) messages in Rails 3.1?
With Rails 3.1, the sprockets gem was introduced. I have written a very large
I try to deploy my rails 3.1 application with capistrano but it fails with
Under many operating systems Unix-domain sockets allow a process to reliably pass its credentials
I have an application that uses simple sockets to pass some characters between two
At my work we recently finished the system architecture for a control application which
I just deployed my Rails app to Heroku, but the Javascripts that were using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.