Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

3 participants

@guilleiguaran

No description provided.

@guilleiguaran

Not sure if this is too late for 3.2 release :)

@josevalim josevalim merged commit 5b9a506 into from
@josevalim
Owner

Sounds good for 3-2-stable.

@josevalim josevalim merged commit 226783d into from
@fu-media

not working?
is that implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.