Class: CxLog::Formatters::KeyValue

Inherits:
Object
  • Object
show all
Defined in:
lib/cx_log/formatters/key_value.rb

Overview

Formats data with plain text. Given a hash with key (k) and value (v), the formatter will return a string with the format “k=v …”

Instance Method Summary collapse

Instance Method Details

#call(data) ⇒ Object



8
9
10
# File 'lib/cx_log/formatters/key_value.rb', line 8

def call(data)
  data.map { |key, value| "#{key}=#{value}" }.join(" ")
end