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>
This commit is contained in:
Eric Wong 2010-08-05 08:46:04 +00:00
Родитель f46e130439
Коммит e9323e7f09
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -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