Class: Hutch::ErrorHandlers::Airbrake
- Inherits:
-
Object
- Object
- Hutch::ErrorHandlers::Airbrake
- Includes:
- Logging
- Defined in:
- lib/hutch/error_handlers/airbrake.rb
Instance Method Summary collapse
Methods included from Logging
#logger, logger, logger=, setup_logger
Instance Method Details
#handle(message_id, payload, consumer, ex) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/hutch/error_handlers/airbrake.rb', line 9 def handle(, payload, consumer, ex) prefix = "message(#{ || '-'}): " logger.error prefix + "Logging event to Airbrake" logger.error prefix + "#{ex.class} - #{ex.}" ::Airbrake.notify_or_ignore(ex, { :error_class => ex.class.name, :error_message => "#{ ex.class.name }: #{ ex. }", :backtrace => ex.backtrace, :parameters => { :payload => payload, :consumer => consumer, }, :cgi_data => ENV.to_hash, }) end |