ruby-changes:35190
From: nobu <ko1@a...>
Date: Mon, 25 Aug 2014 13:03:40 +0900 (JST)
Subject: [ruby-changes:35190] nobu:r47272 (trunk): logger.rb: simplify
nobu 2014-08-25 13:03:33 +0900 (Mon, 25 Aug 2014) New Revision: 47272 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47272 Log: logger.rb: simplify * lib/logger.rb (format_datetime): simplify and freeze the default format so that it can be shared. Modified files: trunk/lib/logger.rb Index: lib/logger.rb =================================================================== --- lib/logger.rb (revision 47271) +++ lib/logger.rb (revision 47272) @@ -510,11 +510,7 @@ private https://github.com/ruby/ruby/blob/trunk/lib/logger.rb#L510 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/