lib/logstasher/railtie.rb in logstasher-0.7.1 vs lib/logstasher/railtie.rb in logstasher-0.8.0
- old
+ new
@@ -2,13 +2,20 @@
require 'action_view/log_subscriber'
require 'action_controller/log_subscriber'
module LogStasher
class Railtie < Rails::Railtie
- config.logstasher = ActiveSupport::OrderedOptions.new
+ config.logstasher = ::ActiveSupport::OrderedOptions.new
config.logstasher.enabled = false
initializer :logstasher, :before => :load_config_initializers do |app|
- LogStasher.setup(app) if app.config.logstasher.enabled
+ app.config.action_dispatch.rack_cache[:verbose] = false if app.config.action_dispatch.rack_cache
+ LogStasher.setup_before(app.config.logstasher) if app.config.logstasher.enabled
+ end
+
+ initializer :logstasher do
+ config.after_initialize do
+ LogStasher.setup(config.logstasher) if config.logstasher.enabled
+ end
end
end
end