Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #4501 from rafaelfranca/assets-logger-3-2

Add option to configure Sprockets logger [3-2-stable]
  • Loading branch information...
commit 5812c35b881d9f6bca3bae92bb4ab7652f8c40ad 2 parents ed35f37 + c4c6beb
@josevalim josevalim authored
2  actionpack/
@@ -1,5 +1,7 @@
## Rails 3.2.0 (unreleased) ##
+* Add config.assets.logger to configure Sprockets logger *Rafael França*
* Use a BodyProxy instead of including a Module that responds to
close. Closes #4441 if Active Record is disabled assets are delivered
correctly *Santiago Pastorino*
2  actionpack/lib/sprockets/railtie.rb
@@ -21,7 +21,7 @@ class Railtie < ::Rails::Railtie
require 'sprockets'
app.assets = do |env|
- env.logger = ::Rails.logger
+ env.logger = config.assets.logger || ::Rails.logger
env.version = ::Rails.env + "-#{config.assets.version}"
if config.assets.cache_store != false
2  railties/guides/source/configuring.textile
@@ -156,6 +156,8 @@ Rails 3.1, by default, is set up to use the +sprockets+ gem to manage assets wit
* +config.assets.compile+ is a boolean that can be used to turn on live Sprockets compilation in production.
+* +config.assets.logger+ accepts a logger conforming to the interface of Log4r or the default Ruby +Logger+ class. Defaults to the same configured at +config.logger+.
h4. Configuring Generators
Please sign in to comment.
Something went wrong with that request. Please try again.