class Sidekiq::Logging::Pretty
Constants
- SPACE
Public Instance Methods
call(severity, time, program_name, message)
click to toggle source
Provide a call() method that returns the formatted message.
# File lib/sidekiq/logging.rb, line 13 def call(severity, time, program_name, message) "#{time.utc.iso8601(3)} #{::Process.pid} TID-#{Thread.current.object_id.to_s(36)}#{context} #{severity}: #{message}\n" end
context()
click to toggle source
# File lib/sidekiq/logging.rb, line 17 def context c = Thread.current[:sidekiq_context] " #{c.join(SPACE)}" if c && c.any? end