lib/semantic_logger/appender/sentry.rb in semantic_logger-4.6.1 vs lib/semantic_logger/appender/sentry.rb in semantic_logger-4.7.0
- old
+ new
@@ -1,9 +1,9 @@
begin
- require 'sentry-raven'
+ require "sentry-raven"
rescue LoadError
- raise LoadError.new('Gem sentry-raven is required for logging purposes. Please add the gem "sentry-raven" to your Gemfile.')
+ raise LoadError, 'Gem sentry-raven is required for logging purposes. Please add the gem "sentry-raven" to your Gemfile.'
end
# Send log messages to sentry
#
# Example:
@@ -44,15 +44,15 @@
end
# Send an error notification to sentry
def log(log)
# Ignore logs coming from Raven itself
- return false if log.name == 'Raven'
+ return false if log.name == "Raven"
- context = formatter.call(log, self)
- user = context.delete(:user)
- tags = context.delete(:tags)
- attrs = {
+ context = formatter.call(log, self)
+ user = context.delete(:user)
+ tags = context.delete(:tags)
+ attrs = {
level: context.delete(:level),
extra: context
}
attrs[:user] = user if user
attrs[:tags] = tags if tags