lib/semantic_logger/appender/sentry.rb in semantic_logger-4.1.1 vs lib/semantic_logger/appender/sentry.rb in semantic_logger-4.2.0

- old
+ new

@@ -41,22 +41,21 @@ super(level: level, formatter: formatter, filter: filter, application: application, host: host, &block) end # Send an error notification to sentry def log(log) - return false unless should_log?(log) - # Ignore logs coming from Ravent itself + # Ignore logs coming from Raven itself return false if log.name == 'Raven' context = formatter.call(log, self) + attrs = { + level: context.delete(:level), + extra: context + } if log.exception context.delete(:exception) - Raven.capture_exception(log.exception, context) + Raven.capture_exception(log.exception, attrs) else - attrs = { - level: context.delete(:level), - extra: context - } attrs[:extra][:backtrace] = log.backtrace if log.backtrace Raven.capture_message(context[:message], attrs) end true end