diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-08-05 12:46:04 +0400 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-08-05 12:51:26 +0400 |
commit | e9323e7f09d171739e8dbc9d60d77281caa06177 (patch) | |
tree | f326a533da060b83ae4e91a348d6be7832703ec7 | |
parent | f46e130439a57ce44708971183adab7e58512b34 (diff) |
instaweb: add access+error logging for WEBrick
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>
-rwxr-xr-x | git-instaweb.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh index e69fb74fef1..e6f6ecda177 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -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 |