Class: AsyncRack::CommonLogger

Inherits:
AsyncCallback
  • Object
show all
Defined in:
lib/async_rack/commonlogger.rb

Instance Method Summary collapse

Instance Method Details

#async_callback(result) ⇒ Object



5
6
7
8
9
10
# File 'lib/async_rack/commonlogger.rb', line 5

def async_callback(result)
  status, header, body = result
  header = Rack::Utils::HeaderHash.new header
  log env, status, header, @began_at
  super [status, header, body]
end

#call(env) ⇒ Object



12
13
14
15
# File 'lib/async_rack/commonlogger.rb', line 12

def call(env)
  @began_at = Time.now
  super
end