Sha256: 02f230d8ef13aff01109d05b8ccec5d37c2f11676b5b8fb6e1ddb8ae039fb8e0

Contents?: true

Size: 572 Bytes

Versions: 1

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true
module Heavylog
  class Railtie < Rails::Railtie
    config.heavylog = Heavylog::OrderedOptions.new
    config.heavylog.enabled = false
    config.heavylog.path = 'log/heavylog.log'
    config.heavylog.message_limit = 1024 * 1024 * 50 # 50MB
    config.heavylog.log_sidekiq = false

    initializer "heavylog.insert_middleware" do |app|
      app.config.middleware.insert_before Rails::Rack::Logger, Heavylog::Middleware
    end

    config.after_initialize do |app|
      Heavylog.setup(app) if app.config.heavylog.enabled
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heavylog-0.0.9 lib/heavylog/railtie.rb