mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge pull request #4518 from guilleiguaran/silent-sprockets-logger-3-2-stable
Silent Sprockets logger when config.assets.logger is set to false (3-2-stable)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
## Rails 3.2.0 (unreleased) ##
|
||||
|
||||
* Setting config.assets.logger to false turn off Sprockets logger *Guillermo Iguaran*
|
||||
|
||||
* Add `config.action_dispatch.default_charset` to configure default charset for ActionDispatch::Response. *Carlos Antonio da Silva*
|
||||
|
||||
* Deprecate setting default charset at controller level, use the new `config.action_dispatch.default_charset` instead. *Carlos Antonio da Silva*
|
||||
|
||||
@@ -21,9 +21,12 @@ module Sprockets
|
||||
require 'sprockets'
|
||||
|
||||
app.assets = Sprockets::Environment.new(app.root.to_s) do |env|
|
||||
env.logger = config.assets.logger || ::Rails.logger
|
||||
env.version = ::Rails.env + "-#{config.assets.version}"
|
||||
|
||||
if config.assets.logger != false
|
||||
env.logger = config.assets.logger || ::Rails.logger
|
||||
end
|
||||
|
||||
if config.assets.cache_store != false
|
||||
env.cache = ActiveSupport::Cache.lookup_store(config.assets.cache_store) || ::Rails.cache
|
||||
end
|
||||
|
||||
@@ -156,8 +156,7 @@ 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+.
|
||||
|
||||
* +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+. Setting +config.assets.logger+ to false will turn off served assets logging.
|
||||
|
||||
h4. Configuring Generators
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ module Rails
|
||||
@assets.js_compressor = nil
|
||||
@assets.css_compressor = nil
|
||||
@assets.initialize_on_precompile = true
|
||||
@assets.logger = nil
|
||||
end
|
||||
|
||||
def compiled_asset_path
|
||||
|
||||
Reference in New Issue
Block a user