From dba351e9c27266f76cb653d59cd36a20586bdda0 Mon Sep 17 00:00:00 2001 From: gotoyuzo Date: Mon, 8 Sep 2003 16:57:25 +0000 Subject: [PATCH] * lib/webrick/httpserver.rb (HTTPServer#access_log): add "\n" to the message. * lib/webrick/log.rb (BasicLog#log): add "\n" only if needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ lib/webrick/httpserver.rb | 2 +- lib/webrick/log.rb | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b857f645f3..30f2c24a1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Sep 9 01:50:45 2003 GOTOU Yuuzou + + * lib/webrick/httpserver.rb (HTTPServer#access_log): add "\n" to + the message. + + * lib/webrick/log.rb (BasicLog#log): add "\n" only if needed. + Mon Sep 8 22:15:33 2003 * ext/tk/lib/multi-tk.rb: modify security check at creating diff --git a/lib/webrick/httpserver.rb b/lib/webrick/httpserver.rb index f50e7d52dd..cb5cd2af2f 100644 --- a/lib/webrick/httpserver.rb +++ b/lib/webrick/httpserver.rb @@ -123,7 +123,7 @@ module WEBrick def access_log(config, req, res) param = AccessLog::setup_params(config, req, res) @config[:AccessLog].each{|logger, fmt| - logger << AccessLog::format(fmt, param) + logger << AccessLog::format(fmt+"\n", param) } end diff --git a/lib/webrick/log.rb b/lib/webrick/log.rb index 9331020ab4..68db47abc7 100644 --- a/lib/webrick/log.rb +++ b/lib/webrick/log.rb @@ -36,7 +36,10 @@ module WEBrick def log(level, data) if @log && level <= @level - @log << (data + "\n") + if /\n\Z/ != data + @log << data + @log << "\n" if /\n\Z/ !~ data + end end end