Sha256: 47775adeb6fc8503eec27c95819732fbd5227e23a654eb7c1461efde65f9c48a

Contents?: true

Size: 524 Bytes

Versions: 2

Compression:

Stored size: 524 Bytes

Contents

require 'active_support/concern'
require 'rails/rack/logger'

module Rails
  module Rack
    # Overwrites defaults of Rails::Rack::Logger that cause
    # unnecessary logging.
    # This effectively removes the log lines from the log
    # that say:
    # Started GET / for 192.168.2.1...
    class Logger
      # Overwrites Rails 3.2 code that logs new requests
      def call_app(*args)
        env = args.last
        @app.call(env)
      ensure
        ActiveSupport::LogSubscriber.flush_all!
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hickory-0.1.1 lib/hickory/ext/rails/rack/logger.rb
hickory-0.1.0 lib/hickory/ext/rails/rack/logger.rb