Permalink
Browse files

Silent Sprockets logger when config.assets.logger is set to false

  • Loading branch information...
1 parent 2f52bd3 commit 02e4d7ffd4b96d13efd0c5ebba703606fc2e6414 @guilleiguaran committed Jan 18, 2012
Showing with 5 additions and 1 deletion.
  1. +4 −1 actionpack/lib/sprockets/railtie.rb
  2. +1 −0 railties/lib/rails/application/configuration.rb
@@ -21,9 +21,12 @@ class Railtie < ::Rails::Railtie
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
@@ -57,6 +57,7 @@ def initialize(*)
@assets.js_compressor = nil
@assets.css_compressor = nil
@assets.initialize_on_precompile = true
+ @assets.logger = nil
end
def compiled_asset_path

0 comments on commit 02e4d7f

Please sign in to comment.