Sha256: 1885fe29eb1f74c671e8a89bd2ccacb66ddbbd8b560d2fffe45b2bea251dcaf3

Contents?: true

Size: 693 Bytes

Versions: 4

Compression:

Stored size: 693 Bytes

Contents

require 'rails/railtie'
require 'action_view/log_subscriber'
require 'action_controller/log_subscriber'

module LogStasher
  class Railtie < Rails::Railtie
    config.logstasher = ::ActiveSupport::OrderedOptions.new
    config.logstasher.enabled = false

    initializer :logstasher, :before => :load_config_initializers do |app|
      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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
logstasher-0.8.6 lib/logstasher/railtie.rb
logstasher-0.8.5 lib/logstasher/railtie.rb
logstasher-0.8.2 lib/logstasher/railtie.rb
logstasher-0.8.0 lib/logstasher/railtie.rb