diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-01-17 22:05:56 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-01-17 22:05:56 -0500 |
commit | 226783d1e8891a38d4a61017952528970dba903d (patch) | |
tree | 6af895d87040d902669506281f51eededf71a8fc | |
parent | 57aaaa61977e82b9de2c43c26b00e636030685c4 (diff) | |
download | rails-226783d1e8891a38d4a61017952528970dba903d.tar.gz rails-226783d1e8891a38d4a61017952528970dba903d.tar.bz2 rails-226783d1e8891a38d4a61017952528970dba903d.zip |
Silent Sprockets logger when config.assets.logger is set to false
-rw-r--r-- | actionpack/lib/sprockets/railtie.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb index 9f4151e4b3..44ddab0950 100644 --- a/actionpack/lib/sprockets/railtie.rb +++ b/actionpack/lib/sprockets/railtie.rb @@ -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 diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index da0d425ef2..9e9d26a783 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -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 |