Sha256: cf2df87c8d380e626e604311cddcd0f178f0ce370468b4a2c574ec55feadfa66

Contents?: true

Size: 332 Bytes

Versions: 1

Compression:

Stored size: 332 Bytes

Contents

module Heavylog
  class SidekiqExceptionHandler
    def call(ex, ctxHash)
      Heavylog.log(:warn, Sidekiq.dump_json(ctxHash)) if !ctxHash.empty?
      Heavylog.log(:warn, "#{ex.class.name}: #{ex.message}")
      Heavylog.log(:warn, ex.backtrace.join("\n")) unless ex.backtrace.nil?
      Heavylog.finish_sidekiq
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heavylog-0.0.9 lib/heavylog/sidekiq_exception_handler.rb