提交 e9323e7f 编写于 作者: E Eric Wong

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: NEric Wong <normalperson@yhbt.net>
上级 f46e1304
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册