diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-04-01 08:43:30 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-04-01 08:43:30 +0000 |
commit | e20a52b735e83db3dbd20f1d96e947cc8bf82161 (patch) | |
tree | 3170a1182a60e4f82ee1af7efd157cbdc72f2696 /lib/mongrel | |
parent | 6d1c93465b1c46acb9ede4bd0dbf3ab360981e6a (diff) | |
download | unicorn-e20a52b735e83db3dbd20f1d96e947cc8bf82161.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@135 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel')
-rw-r--r-- | lib/mongrel/command.rb | 2 | ||||
-rw-r--r-- | lib/mongrel/debug.rb | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/mongrel/command.rb b/lib/mongrel/command.rb index 0341e15..a500ce0 100644 --- a/lib/mongrel/command.rb +++ b/lib/mongrel/command.rb @@ -52,7 +52,7 @@ module Mongrel @opt.on_tail("--version", "Show version") do @done_validating = true if VERSION - puts "Version #{VERSION}" + puts "Version #{MONGREL_VERSION}" end end diff --git a/lib/mongrel/debug.rb b/lib/mongrel/debug.rb index 6178872..e3c6504 100644 --- a/lib/mongrel/debug.rb +++ b/lib/mongrel/debug.rb @@ -219,6 +219,19 @@ end module RequestLog + + # Just logs whatever requests it gets to STDERR (which ends up in the mongrel + # log when daemonized). + class Access < GemPlugin::Plugin "/handlers" + include Mongrel::HttpHandlerPlugin + + def process(request,response) + p = request.params + STDERR.puts "#{p['REMOTE_ADDR']} - [#{HttpServer.httpdate(Time.now)}] \"#{p['REQUEST_METHOD']} #{p["REQUEST_URI"]} HTTP/1.1\"" + end + end + + class Files < GemPlugin::Plugin "/handlers" include Mongrel::HttpHandlerPlugin |