summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-07-28 08:30:26 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-07-28 08:30:26 +0000
commit190fae5f0cef11d68c7385be0c4013931796f958 (patch)
treecce10831d4b6b68b0b85787360e81e1a2cb27b8c /config
parent3f1b7b88c8d4f19a10920ad1629fc440af584d08 (diff)
parent96c4a15eae9b93a2bfb512309e860da50d2e2636 (diff)
downloadgitlab-ce-190fae5f0cef11d68c7385be0c4013931796f958.tar.gz
Merge branch 'sh-augment-lograge-output' into 'master'
Add remote IP, user ID and username to JSON lograge output See merge request !13147
Diffstat (limited to 'config')
-rw-r--r--config/initializers/lograge.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/config/initializers/lograge.rb b/config/initializers/lograge.rb
index 039b4c87b0d..21fe8d72459 100644
--- a/config/initializers/lograge.rb
+++ b/config/initializers/lograge.rb
@@ -14,7 +14,10 @@ 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)),
+ remote_ip: event.payload[:remote_ip],
+ user_id: event.payload[:user_id],
+ username: event.payload[:username]
}
end
end