~singpolyma/sgx-jmp

71ed2c228f54e4a1a6f951bcba51e0977f92ae09 — Stephen Paul Weber 13 days ago 633d209
Add breadcrumbs regardless of log level
1 files changed, 6 insertions(+), 1 deletions(-)

M lib/patches_for_sentry.rb
M lib/patches_for_sentry.rb => lib/patches_for_sentry.rb +6 -1
@@ 1,8 1,13 @@
# frozen_string_literal: true

module SentryOugai
	def _log(severity, *args)
		severity ||= Ougai::UNKNOWN
		append(severity, block_given? ? yield : args)
	end

	def super_add(severity, data)
		super
		super unless level > severity
		return unless Sentry.get_current_hub

		level = Sentry::Breadcrumb::SentryLogger::LEVELS.fetch(severity, nil)