Sha256: a01572473fba7d301411c7dde6c7157263a2697b9d1e985f5eca62e7c4f3ef71

Contents?: true

Size: 411 Bytes

Versions: 16

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true

module Kiev
  module Rack
    class SilenceActionDispatchLogger
      class << self
        attr_accessor :disabled
      end

      NULL_LOGGER = ::Logger.new("/dev/null")

      def initialize(app)
        @app = app
      end

      def call(env)
        env["action_dispatch.logger"] = NULL_LOGGER unless self.class.disabled
        @app.call(env)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
kiev-4.9.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.8.3 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.8.2 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.8.1 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.8.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.7.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.6.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.5.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.4.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.3.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.2.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.1.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-4.0.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-3.0.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-2.8.0 lib/kiev/rack/silence_action_dispatch_logger.rb
kiev-2.7.3 lib/kiev/rack/silence_action_dispatch_logger.rb