class Ey::Logger::Formatter

Attributes

prefix[R]

Public Class Methods

for(type) click to toggle source
# File lib/ey/logger/formatter.rb, line 6
def self.for(type)
  types.fetch(type)
end
new(prefix) click to toggle source
# File lib/ey/logger/formatter.rb, line 12
def initialize(prefix)
  @prefix = prefix
end
types() click to toggle source
# File lib/ey/logger/formatter.rb, line 2
def self.types
  @@types ||= {}
end

Public Instance Methods

call(_tag, data) click to toggle source
# File lib/ey/logger/formatter.rb, line 16
def call(_tag, data)
  raise NotImplementedError
end
tag_for(tag) click to toggle source
# File lib/ey/logger/formatter.rb, line 20
def tag_for(tag)
  [prefix, tag].compact.join(".")
end