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.



50
51
52
# File 'lib/gemstash/logging.rb', line 50

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



54
55
56
57
# File 'lib/gemstash/logging.rb', line 54

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