diff options
author | José Valim <jose.valim@gmail.com> | 2012-01-17 09:40:06 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-17 09:40:06 -0800 |
commit | 5812c35b881d9f6bca3bae92bb4ab7652f8c40ad (patch) | |
tree | 252ef304e62aca95795dc77f960878ee18421573 | |
parent | ed35f3747c2acfeac140e6d8a44bc0e491fca1a3 (diff) | |
parent | c4c6bebecfed8ec6baa3e3624acc7cde87f9fae6 (diff) | |
download | rails-5812c35b881d9f6bca3bae92bb4ab7652f8c40ad.tar.gz rails-5812c35b881d9f6bca3bae92bb4ab7652f8c40ad.tar.bz2 rails-5812c35b881d9f6bca3bae92bb4ab7652f8c40ad.zip |
Merge pull request #4501 from rafaelfranca/assets-logger-3-2
Add option to configure Sprockets logger [3-2-stable]
-rw-r--r-- | actionpack/CHANGELOG.md | 2 | ||||
-rw-r--r-- | actionpack/lib/sprockets/railtie.rb | 2 | ||||
-rw-r--r-- | railties/guides/source/configuring.textile | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index 8a4be5667e..8e870448fd 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -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* diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb index a7eb03acaf..9f4151e4b3 100644 --- a/actionpack/lib/sprockets/railtie.rb +++ b/actionpack/lib/sprockets/railtie.rb @@ -21,7 +21,7 @@ module Sprockets require 'sprockets' app.assets = Sprockets::Environment.new(app.root.to_s) 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 diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile index 09ef308665..9a6f40b9e6 100644 --- a/railties/guides/source/configuring.textile +++ b/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 |