Class: Sidekiq::Logger::Formatters::JSON
- Defined in:
- lib/sidekiq/logger.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#call(severity, time, program_name, message) ⇒ Object
71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/sidekiq/logger.rb', line 71 def call(severity, time, program_name, ) hash = { ts: time.utc.iso8601(3), pid: ::Process.pid, tid: tid, lvl: severity, msg: } c = Sidekiq::Context.current hash["ctx"] = c unless c.empty? Sidekiq.dump_json(hash) << "\n" end |