Skip to content
Browse files

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

  • Loading branch information...
1 parent 57aaaa6 commit 226783d1e8891a38d4a61017952528970dba903d @guilleiguaran committed Jan 17, 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
View
5 actionpack/lib/sprockets/railtie.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
View
1 railties/lib/rails/application/configuration.rb
@@ -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 226783d

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