Skip to content
This repository
Browse code

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
José Valim authored January 17, 2012
2  actionpack/CHANGELOG.md
Source Rendered
... ...
@@ -1,5 +1,7 @@
1 1
 ## Rails 3.2.0 (unreleased) ##
2 2
 
  3
+*   Add config.assets.logger to configure Sprockets logger *Rafael França*
  4
+
3 5
 *   Use a BodyProxy instead of including a Module that responds to
4 6
     close. Closes #4441 if Active Record is disabled assets are delivered
5 7
     correctly *Santiago Pastorino*
2  actionpack/lib/sprockets/railtie.rb
@@ -21,7 +21,7 @@ class Railtie < ::Rails::Railtie
21 21
       require 'sprockets'
22 22
 
23 23
       app.assets = Sprockets::Environment.new(app.root.to_s) do |env|
24  
-        env.logger  = ::Rails.logger
  24
+        env.logger  = config.assets.logger || ::Rails.logger
25 25
         env.version = ::Rails.env + "-#{config.assets.version}"
26 26
 
27 27
         if config.assets.cache_store != false
2  railties/guides/source/configuring.textile
Source Rendered
@@ -156,6 +156,8 @@ Rails 3.1, by default, is set up to use the +sprockets+ gem to manage assets wit
156 156
 
157 157
 * +config.assets.compile+ is a boolean that can be used to turn on live Sprockets compilation in production.
158 158
 
  159
+* +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+.
  160
+
159 161
 
160 162
 h4. Configuring Generators
161 163
 

0 notes on commit 5812c35

Please sign in to comment.
Something went wrong with that request. Please try again.