Class: Deimos::Logger
- Inherits:
-
Object
- Object
- Deimos::Logger
- Defined in:
- lib/deimos/logger.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, logger = Deimos.logger) ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
Instance Method Details
#call(env) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/deimos/logger.rb', line 13 def call(env) began_at = Rack::Utils.clock_time status, header, body = @app.call(env) header = Rack::Utils::HeaderHash.new(header) body = Rack::BodyProxy.new(body) { log(env, status, header, began_at) } [status, header, body] end |