16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/sentry/processor/log_as_warning.rb', line 16
def process(data)
stringified_data = data.deep_stringify_keys
return stringified_data if stringified_data['exception'].blank?
return set_warning_level(stringified_data) if stringified_data['extra'].try(:[], 'log_as_warning')
exception_class = get_exception_class(stringified_data)
RELEVANT_EXCEPTIONS.each do |relevant_exception|
return set_warning_level(stringified_data) if exception_class <= relevant_exception
end
stringified_data
end
|