class SemanticLogger::Formatters::Raw
Override SemanticLogger's keys for tags, named_tags, and payload. It is emminently unhelpful to have three places the same data may be- ie, in some cases, we may have a customer_id in a named tag, sometimes in payload, etc. Callsite behavior should not vary the shape/content of the log message.
Public Instance Methods
call(log, logger)
click to toggle source
# File lib/appydays/loggable.rb, line 16 def call(log, logger) h = self.original_call(log, logger) ctx = h[:context] ||= {} ctx[:_tags] = h.delete(:tags) if h.key?(:tags) [:named_tags, :payload].each do |hash_key| next unless h.key?(hash_key) h.delete(hash_key).each do |k, v| ctx[k] = v end end return h end
Also aliased as: original_call