Class: Sidekiq::Logger::Formatters::Base
- Inherits:
-
Logger::Formatter
- Object
- Logger::Formatter
- Sidekiq::Logger::Formatters::Base
- Defined in:
- lib/sidekiq/logger.rb
Instance Method Summary collapse
Instance Method Details
#format_context ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/sidekiq/logger.rb', line 88 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 ⇒ Object
80 81 82 |
# File 'lib/sidekiq/logger.rb', line 80 def tid Thread.current["sidekiq_tid"] ||= (Thread.current.object_id ^ ::Process.pid).to_s(36) end |