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:
parent
f46e130439
commit
e9323e7f09
@ -216,9 +216,15 @@ EOF
|
|||||||
cat >"$fqgitdir/gitweb/$httpd.rb" <<EOF
|
cat >"$fqgitdir/gitweb/$httpd.rb" <<EOF
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require 'webrick'
|
require 'webrick'
|
||||||
|
require 'logger'
|
||||||
options = {
|
options = {
|
||||||
:Port => $port,
|
:Port => $port,
|
||||||
:DocumentRoot => "$root",
|
:DocumentRoot => "$root",
|
||||||
|
:Logger => Logger.new('$fqgitdir/gitweb/error.log'),
|
||||||
|
:AccessLog => [
|
||||||
|
[ Logger.new('$fqgitdir/gitweb/access.log'),
|
||||||
|
WEBrick::AccessLog::COMBINED_LOG_FORMAT ]
|
||||||
|
],
|
||||||
:DirectoryIndex => ["gitweb.cgi"],
|
:DirectoryIndex => ["gitweb.cgi"],
|
||||||
:CGIInterpreter => "$wrapper",
|
:CGIInterpreter => "$wrapper",
|
||||||
:StartCallback => lambda do
|
:StartCallback => lambda do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user