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