Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/sidekiq_logging/json_formatter.rb')
-rw-r--r--lib/gitlab/sidekiq_logging/json_formatter.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/sidekiq_logging/json_formatter.rb b/lib/gitlab/sidekiq_logging/json_formatter.rb
index c20e929ae36..45c6842c59b 100644
--- a/lib/gitlab/sidekiq_logging/json_formatter.rb
+++ b/lib/gitlab/sidekiq_logging/json_formatter.rb
@@ -19,6 +19,7 @@ module Gitlab
output[:message] = data
when Hash
convert_to_iso8601!(data)
+ stringify_args!(data)
output.merge!(data)
end
@@ -39,6 +40,10 @@ module Gitlab
Time.at(timestamp).utc.iso8601(3)
end
+
+ def stringify_args!(payload)
+ payload['args'] = Gitlab::Utils::LogLimitedArray.log_limited_array(payload['args'].map(&:to_s)) if payload['args']
+ end
end
end
end