Module: GetaroundUtils::Patches::KeyValueLogTags::RackLogger

Defined in:
lib/getaround_utils/patches/key_value_log_tags.rb

Instance Method Summary collapse

Instance Method Details

#compute_tags(request) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/getaround_utils/patches/key_value_log_tags.rb', line 35

def compute_tags(request)
  @taggers.collect do |tag|
    case tag
    when Proc
      GetaroundUtils::Utils::DeepKeyValue.serialize(tag.call(request))
    when Symbol
      GetaroundUtils::Utils::DeepKeyValue.serialize(tag => request.send(tag))
    else
      GetaroundUtils::Utils::DeepKeyValue.serialize(tag)
    end
  end
end