Merge branch 'aiionx_sidekiq_log_patch' into 'master'

Log sidekiq arguments as json

Logging the sidekiq job arguments as a ruby literal structure 
is akward. Specially when parsing the logs.

JSON is a standar format.



See merge request !3735
This commit is contained in:
Rémy Coutable 2016-10-03 14:20:18 +00:00
commit 8d333c87f1

View file

@ -2,7 +2,7 @@ module Gitlab
module SidekiqMiddleware
class ArgumentsLogger
def call(worker, job, queue)
Sidekiq.logger.info "arguments: #{job['args']}"
Sidekiq.logger.info "arguments: #{JSON.dump(job['args'])}"
yield
end
end