Class: RequestLog::Access

Inherits:
Object
  • Object
show all
Includes:
Mongrel::HttpHandlerPlugin
Defined in:
lib/mongrel/debug.rb

Overview

Just logs whatever requests it gets to STDERR (which ends up in the mongrel log when daemonized).

Instance Attribute Summary

Attributes included from Mongrel::HttpHandlerPlugin

#listener, #options, #request_notify

Instance Method Summary collapse

Methods included from Mongrel::HttpHandlerPlugin

#initialize, #request_begins, #request_progress

Instance Method Details

#process(request, response) ⇒ Object



100
101
102
103
# File 'lib/mongrel/debug.rb', line 100

def process(request,response)
  p = request.params
  STDERR.puts "#{p['REMOTE_ADDR']} - [#{Time.now.httpdate}] \"#{p['REQUEST_METHOD']} #{p["REQUEST_URI"]} HTTP/1.1\""
end