Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #4501 from rafaelfranca/assets-logger-3-2
Add option to configure Sprockets logger [3-2-stable]
  • Loading branch information
josevalim committed Jan 17, 2012
2 parents ed35f37 + c4c6beb commit 5812c35
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions 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*
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/sprockets/railtie.rb
Expand Up @@ -21,7 +21,7 @@ class Railtie < ::Rails::Railtie
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
Expand Down
2 changes: 2 additions & 0 deletions railties/guides/source/configuring.textile
Expand Up @@ -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

Expand Down

0 comments on commit 5812c35

Please sign in to comment.