Commit 8d333c87 authored by Rémy Coutable's avatar Rémy Coutable

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
parents c4a061a2 dc20dd27
...@@ -2,7 +2,7 @@ module Gitlab ...@@ -2,7 +2,7 @@ module Gitlab
module SidekiqMiddleware module SidekiqMiddleware
class ArgumentsLogger class ArgumentsLogger
def call(worker, job, queue) def call(worker, job, queue)
Sidekiq.logger.info "arguments: #{job['args']}" Sidekiq.logger.info "arguments: #{JSON.dump(job['args'])}"
yield yield
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment