Class: HoneybadgerLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/loggers/honeybadger_logger.rb

Class Method Summary collapse

Class Method Details

.log(severity, message, context, events, metadata) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/loggers/honeybadger_logger.rb', line 3

def self.log(severity, message, context, events, )
  context = context.merge(:severity => severity.to_s, :events => events, :metadata => )
  if message.kind_of?(Exception)
    send_to_honeybadger(message, context)
  elsif Log::SEVERITIES[severity] >= Log::SEVERITIES[:error]
    send_to_honeybadger(Exception.new(message), context)
  end
end