aboutsummaryrefslogtreecommitdiff
path: root/git-instaweb.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-08-05 08:46:04 +0000
committerEric Wong <normalperson@yhbt.net>2010-08-05 08:51:26 +0000
commite9323e7f09d171739e8dbc9d60d77281caa06177 (patch)
treef326a533da060b83ae4e91a348d6be7832703ec7 /git-instaweb.sh
parentf46e130439a57ce44708971183adab7e58512b34 (diff)
downloadgit-e9323e7f09d171739e8dbc9d60d77281caa06177.tar.gz
git-e9323e7f09d171739e8dbc9d60d77281caa06177.tar.xz
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>
Diffstat (limited to 'git-instaweb.sh')
-rwxr-xr-xgit-instaweb.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh
index e69fb74fe..e6f6ecda1 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