Class: Merb::Rack::Tracer

Inherits:
Middleware show all
Defined in:
lib/merb-core/rack/middleware/tracer.rb

Instance Method Summary collapse

Methods inherited from Middleware

#initialize

Methods included from DeferrableMiddleware

#deferred?

Constructor Details

This class inherits a constructor from Merb::Rack::Middleware

Instance Method Details

#call(env) ⇒ Object

:api: plugin



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/merb-core/rack/middleware/tracer.rb', line 6

def call(env)

  Merb.logger.debug!("Rack environment:\n" + env.inspect + "\n\n")

  status, headers, body = @app.call(env)

  Merb.logger.debug!("Status: #{status.inspect}")
  Merb.logger.debug!("Headers: #{headers.inspect}")
  Merb.logger.debug!("Body: #{body.inspect}")

  [status, headers, body]
end