Class: Sidekiq::ExceptionHandler::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/sidekiq/exception_handler.rb

Instance Method Summary collapse

Instance Method Details

#call(ex, ctx) ⇒ Object



8
9
10
11
12
# File 'lib/sidekiq/exception_handler.rb', line 8

def call(ex, ctx)
  Sidekiq.logger.warn(Sidekiq.dump_json(ctx)) unless ctx.empty?
  Sidekiq.logger.warn("#{ex.class.name}: #{ex.message}")
  Sidekiq.logger.warn(ex.backtrace.join("\n")) unless ex.backtrace.nil?
end