Skip to content

Commit

Permalink
Remove some duplicate arg formatting code
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Buch committed Sep 21, 2015
1 parent 039033e commit ab4aeb6
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/travis/support/logger/format.rb
Expand Up @@ -67,17 +67,11 @@ def time_format
def l2met_args_to_record(l2met_args)
args = l2met_args.dup
''.tap do |s|
%i(time level msg).each do |key|
(%i(time level msg) + (args.keys.sort - %i(time level msg))).each do |key|
value = args.delete(key)
value = value.inspect if value.respond_to?(:=~) && value =~ /\s/
s << "#{key}=#{value} "
end

args.keys.sort.each do |key|
value = args[key]
value = value.inspect if value.respond_to?(:=~) && value =~ /\s/
s << "#{key}=#{value} "
end
end
end

Expand Down

0 comments on commit ab4aeb6

Please sign in to comment.