Module: GetaroundUtils::Patches::KeyValueSidekiqExceptions::ExceptionHandlerLogger
- Defined in:
- lib/getaround_utils/patches/key_value_sidekiq_exceptions.rb
Instance Method Summary collapse
Instance Method Details
#call(exception, ctx) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/getaround_utils/patches/key_value_sidekiq_exceptions.rb', line 13 def call(exception, ctx) payload = {} payload[:message] = exception. payload[:exception] = exception.class.name payload[:backtrace] = exception.backtrace&.join("\n") payload[:sidekiq] = ctx Sidekiq.logger.warn(kv_formatter.serialize(payload.compact)) end |
#kv_formatter ⇒ Object
9 10 11 |
# File 'lib/getaround_utils/patches/key_value_sidekiq_exceptions.rb', line 9 def kv_formatter @kv_formatter ||= GetaroundUtils::Utils::DeepKeyValueSerializer.new end |