class Sidekiq::Logger::Formatters::Base

Public Instance Methods

ctx() click to toggle source
# File lib/sidekiq/logger.rb, line 109
def ctx
  Sidekiq::Context.current
end
format_context() click to toggle source
# File lib/sidekiq/logger.rb, line 113
def format_context
  if ctx.any?
    " " + ctx.compact.map { |k, v|
      case v
      when Array
        "#{k}=#{v.join(",")}"
      else
        "#{k}=#{v}"
      end
    }.join(" ")
  end
end
tid() click to toggle source
# File lib/sidekiq/logger.rb, line 105
def tid
  Thread.current["sidekiq_tid"] ||= (Thread.current.object_id ^ ::Process.pid).to_s(36)
end