summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-07-28 00:24:35 -0500
committerStan Hu <stanhu@gmail.com>2017-07-28 00:26:57 -0500
commit3a200165c3ba43a6f037bcb59c97a13f33624db1 (patch)
treee418a4e1b5b0262f9e52fc0480f6df9f045ce08c /config
parent02b25598cbedaaec96d8c9e52de7f969a5eb71a1 (diff)
downloadgitlab-ce-3a200165c3ba43a6f037bcb59c97a13f33624db1.tar.gz
Fix lograge exclusion in params sectionsh-fix-lograge-exception
Without this fix, we would just see redundant entries in the `params` section: ``` {"method":"GET","path":"/-/metrics","format":"html","controller":"MetricsController","action":"index","status":404,"duration":1.42,"view":0.38,"db":0.0,"time":"2017-07-28T02:59:18.167Z","params":{"controller":"metrics","action":"index"}} ``` The intended format looks more like this: ``` {"method":"GET","path":"/-/metrics","format":"html","controller":"MetricsController","action":"index","status":404,"duration":76.32,"view":69.95,"db":0.0,"time":"2017-07-28T02:59:48.893Z","params":{}} ``` The proper form to exclude an array is to preface with an asterisk: https://apidock.com/rails/Hash/except
Diffstat (limited to 'config')
-rw-r--r--config/initializers/lograge.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/lograge.rb b/config/initializers/lograge.rb
index c9a515dfcd5..039b4c87b0d 100644
--- a/config/initializers/lograge.rb
+++ b/config/initializers/lograge.rb
@@ -14,7 +14,7 @@ unless Sidekiq.server?
config.lograge.custom_options = lambda do |event|
{
time: event.time.utc.iso8601(3),
- params: event.payload[:params].except(%w(controller action format))
+ params: event.payload[:params].except(*%w(controller action format))
}
end
end