From ddae426a47653b29f5e84e84d73437259e58a4c6 Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Mon, 8 Sep 2003 09:52:34 +0000 Subject: * lib/webrick/accesslog.rb (AccessLog::setup_params): use req.port instead of config[:Port] or req.request_uri.port. * lib/webrick/httprequest.rb (HTTPRequest#meta_vars): ditto. * lib/webrick/httpservlet/filehandler.rb (FileHandler#dir_list): ditto. * lib/webrick/config.rb: :Listen option never be used. * lib/webrick/server.rb (GenericServer#initialize): don't use :Listen option and add warning message. * lib/webrick/log.rb (BasicLog#<<): shortcut of log(INFO, ...). * lib/webrick/httpserver.rb (HTTPServer#accesslog): use << for logging. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/webrick/httpserver.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/webrick/httpserver.rb') diff --git a/lib/webrick/httpserver.rb b/lib/webrick/httpserver.rb index a3da99db1a..f50e7d52dd 100644 --- a/lib/webrick/httpserver.rb +++ b/lib/webrick/httpserver.rb @@ -31,10 +31,9 @@ module WEBrick end unless @config[:AccessLog] - basic_log = BasicLog::new @config[:AccessLog] = [ - [ basic_log, AccessLog::COMMON_LOG_FORMAT ], - [ basic_log, AccessLog::REFERER_LOG_FORMAT ] + [ $stderr, AccessLog::COMMON_LOG_FORMAT ], + [ $stderr, AccessLog::REFERER_LOG_FORMAT ] ] end end @@ -123,9 +122,8 @@ module WEBrick def access_log(config, req, res) param = AccessLog::setup_params(config, req, res) - level = Log::INFO @config[:AccessLog].each{|logger, fmt| - logger.log(level, AccessLog::format(fmt, param)) + logger << AccessLog::format(fmt, param) } end -- cgit v1.2.3