1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Use Job ID for logging

This commit is contained in:
Mike Perham 2012-10-18 11:31:36 -07:00
parent fc3a1fdc50
commit d962ce7700
2 changed files with 3 additions and 2 deletions

View file

@ -1,6 +1,7 @@
HEAD
-----------
- Logging now uses "MSG-#{Job ID}", not a random msg ID
- Allow generic Redis provider as environment variable. [#443]
- Add ability to customize sidekiq\_options with delay calls [#450]

View file

@ -3,8 +3,8 @@ module Sidekiq
module Server
class Logging
def call(*args)
Sidekiq::Logging.with_context("#{args[0].class.to_s} MSG-#{args[0].object_id.to_s(36)}") do
def call(worker, item, queue)
Sidekiq::Logging.with_context("#{worker.class.to_s} MSG-#{item['jid']}") do
begin
start = Time.now
logger.info { "start" }