提交 b0ab8dc0 编写于 作者: P Piotr Niełacny

Use join without default separator

Use lstrip method
上级 24705014
......@@ -16,7 +16,7 @@ module TaggedLogging
module Formatter # :nodoc:
# This method is invoked when a log event occurs
def call(severity, timestamp, progname, msg)
super(severity, timestamp, progname, "#{tags_text}#{msg}")
super(severity, timestamp, progname, "#{tags_text} #{msg}".lstrip)
end
def clear!
......@@ -31,7 +31,7 @@ def current_tags
def tags_text
tags = current_tags
if tags.any?
tags.collect { |tag| "[#{tag}] " }.join
tags.collect { |tag| "[#{tag}]" }.join(' ')
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册