Class: Moon::Logfmt::KeyValueFormatter
- Inherits:
-
Object
- Object
- Moon::Logfmt::KeyValueFormatter
- Defined in:
- lib/moon-logfmt/formatter.rb
Overview
Logfmt’s actual formatter, this takes a key and a value and produces a string
Class Method Summary collapse
-
.default ⇒ KeyValueFormatter
Returns the default instance of the key value formatter.
Instance Method Summary collapse
-
#call(key, value) ⇒ String
Default KEY=VALUE formatter.
Class Method Details
.default ⇒ KeyValueFormatter
Returns the default instance of the key value formatter
34 35 36 |
# File 'lib/moon-logfmt/formatter.rb', line 34 def self.default @default ||= new end |
Instance Method Details
#call(key, value) ⇒ String
Default KEY=VALUE formatter
27 28 29 |
# File 'lib/moon-logfmt/formatter.rb', line 27 def call(key, value) "#{key}=#{value}" end |