Skip to content

Commit

Permalink
instaweb: add access+error logging for WEBrick
Browse files Browse the repository at this point in the history
This allows WEBrick to support all the logging functionality
in a manner consistent with the other web servers.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
  • Loading branch information
Eric Wong committed Aug 5, 2010
1 parent f46e130 commit e9323e7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions git-instaweb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,15 @@ EOF
cat >"$fqgitdir/gitweb/$httpd.rb" <<EOF
#!/usr/bin/env ruby
require 'webrick'
require 'logger'
options = {
:Port => $port,
:DocumentRoot => "$root",
:Logger => Logger.new('$fqgitdir/gitweb/error.log'),
:AccessLog => [
[ Logger.new('$fqgitdir/gitweb/access.log'),
WEBrick::AccessLog::COMBINED_LOG_FORMAT ]
],
:DirectoryIndex => ["gitweb.cgi"],
:CGIInterpreter => "$wrapper",
:StartCallback => lambda do
Expand Down

0 comments on commit e9323e7

Please sign in to comment.