summaryrefslogtreecommitdiff
path: root/lib/webrick/log.rb
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-08 16:57:25 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-08 16:57:25 +0000
commitdba351e9c27266f76cb653d59cd36a20586bdda0 (patch)
tree50dd78ac9f8226c7d4fe9c587113903b75d9112a /lib/webrick/log.rb
parent56663d45fcd45daaa16303a4c3ba7026c681dceb (diff)
* 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
Diffstat (limited to 'lib/webrick/log.rb')
-rw-r--r--lib/webrick/log.rb5
1 files changed, 4 insertions, 1 deletions
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