Class: Rails::Rack::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/lograge/rails_ext/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

#before_dispatch(_env) ⇒ Object

Overwrites Rails 3.0/3.1 code that logs new requests



21
22
# File 'lib/lograge/rails_ext/rack/logger.rb', line 21

def before_dispatch(_env)
end

#call_app(*args) ⇒ Object

Overwrites Rails 3.2 code that logs new requests



13
14
15
16
17
18
# File 'lib/lograge/rails_ext/rack/logger.rb', line 13

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