module Sidekiq::Logging

Replace Sidekiq logging context

Public Class Methods

job_hash_context(job_hash) click to toggle source
# File lib/rails_semantic_logger/extensions/sidekiq/sidekiq.rb, line 19
def self.job_hash_context(job_hash)
  h         = {jid: job_hash["jid"]}
  h[:bid]   = job_hash["bid"] if job_hash["bid"]
  h[:queue] = job_hash["queue"] if job_hash["queue"]
  h
end
with_context(msg, &block) click to toggle source
# File lib/rails_semantic_logger/extensions/sidekiq/sidekiq.rb, line 15
def self.with_context(msg, &block)
  SemanticLogger.tagged(msg, &block)
end