Class: AnyLogger::Example::RackLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/any_logger/example/rack_logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ RackLogger

Returns a new instance of RackLogger.



6
7
8
# File 'lib/any_logger/example/rack_logger.rb', line 6

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



10
11
12
13
14
# File 'lib/any_logger/example/rack_logger.rb', line 10

def call(env)
  @app.call(env)
ensure
  ActiveSupport::LogSubscriber.flush_all!
end