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:
parent
51560a8737
commit
2bded596ec
1 changed files with 1 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue