Class: Gemstash::Logging::RackMiddleware

Inherits:
Object
  • Object
show all
Defined in:
lib/gemstash/logging.rb

Overview

Rack middleware to set the Rack logger to the Gemstash logger.

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ RackMiddleware

Returns a new instance of RackMiddleware.



58
59
60
# File 'lib/gemstash/logging.rb', line 58

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



62
63
64
65
# File 'lib/gemstash/logging.rb', line 62

def call(env)
  env["rack.logger"] = Gemstash::Logging.logger
  @app.call(env)
end