Sha256: 0e055e2068b29bb7234c27dd3d97e8857703a3bb111d8aa8dc556cd20bff6e3e

Contents?: true

Size: 294 Bytes

Versions: 4

Compression:

Stored size: 294 Bytes

Contents

# frozen_string_literal: true

# Logs an exception and a sidekiq context hash in logstash compatible form

class SidekiqExceptionLogger
  def call(exception, context_hash)
    Sidekiq.logger.warn(class: exception.class.name, message: exception.message, context: context_hash.inspect)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
loggery-0.3.0 lib/loggery/sidekiq/sidekiq_exception_logger.rb
loggery-0.2.1 lib/loggery/sidekiq/sidekiq_exception_logger.rb
loggery-0.2.0 lib/loggery/sidekiq/sidekiq_exception_logger.rb
loggery-0.1.0 lib/loggery/sidekiq/sidekiq_exception_logger.rb