Class: Rails::Rack::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/hickory/ext/rails/rack/logger.rb

Overview

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…

Instance Method Summary collapse

Instance Method Details

#call_app(*args) ⇒ Object

Overwrites Rails 3.2 code that logs new requests



12
13
14
15
16
17
# File 'lib/hickory/ext/rails/rack/logger.rb', line 12

def call_app(*args)
  env = args.last
  @app.call(env)
ensure
  ActiveSupport::LogSubscriber.flush_all!
end