Class: Ey::Logger::MachineFormatter

Inherits:
Formatter
  • Object
show all
Defined in:
lib/ey/logger/machine_formatter.rb

Instance Attribute Summary

Attributes inherited from Formatter

#prefix

Instance Method Summary collapse

Methods inherited from Formatter

for, #initialize, #tag_for, types

Constructor Details

This class inherits a constructor from Ey::Logger::Formatter

Instance Method Details

#call(tag, data) ⇒ Object



5
6
7
8
# File 'lib/ey/logger/machine_formatter.rb', line 5

def call(tag, data)
  prefixed_tag = tag_for(tag)
  "[#{prefixed_tag}] #{JSON.dump(data)}"
end