mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Add option to configure Sprockets logger
This commit is contained in:
@@ -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*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user