1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

logger.rb: simplify

* lib/logger.rb (format_datetime): simplify and freeze the default
  format so that it can be shared.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-08-25 04:03:33 +00:00
parent 51560a8737
commit 2bded596ec

View file

@ -510,11 +510,7 @@ private
private
def format_datetime(time)
if @datetime_format.nil?
time.strftime("%Y-%m-%dT%H:%M:%S.%6N ")
else
time.strftime(@datetime_format)
end
time.strftime(@datetime_format || "%Y-%m-%dT%H:%M:%S.%6N ".freeze)
end
def msg2str(msg)