lib/semantic_logger/appender/honeybadger.rb in semantic_logger-4.6.1 vs lib/semantic_logger/appender/honeybadger.rb in semantic_logger-4.7.0
- old
+ new
@@ -1,9 +1,9 @@
begin
- require 'honeybadger'
+ require "honeybadger"
rescue LoadError
- raise LoadError.new('Gem honeybadger is required for logging purposes. Please add the gem "honeybadger" to your Gemfile.')
+ raise LoadError, 'Gem honeybadger is required for logging purposes. Please add the gem "honeybadger" to your Gemfile.'
end
# Send log messages to honeybadger
#
# Example:
@@ -46,10 +46,10 @@
context = formatter.call(log, self)
if log.exception
context.delete(:exception)
::Honeybadger.notify(log.exception, context)
else
- message = {
+ message = {
error_class: context.delete(:name),
error_message: context.delete(:message),
context: context
}
message[:backtrace] = log.backtrace if log.backtrace