class Logfoo::Hutch::ErrorHandler

Constants

ID

Attributes

handler[RW]
bunny_log[R]
hutch_log[R]

Public Class Methods

new() click to toggle source
# File lib/logfoo/integrations/hutch.rb, line 12
def initialize
  @hutch_log = Logfoo.get_logger(ID)
  @bunny_log = Logfoo.get_logger('Bunny')
  @bunny_log.level = Logfoo::WARN
end

Public Instance Methods

handle(message_id, payload, consumer, ex) click to toggle source
# File lib/logfoo/integrations/hutch.rb, line 18
def handle(message_id, payload, consumer, ex)
  line = ErrLine.build(
    logger_name: ID,
    exception:   ex,
    payload:     (payload || {}).merge!(
      consumer:    consumer,
      message_id:  message_id
    )
  )
  App.instance.append(line)
end