Commit 3a200165 authored by Stan Hu's avatar Stan Hu

Fix lograge exclusion in params section

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
parent 02b25598
......@@ -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
......
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