diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-28 08:30:26 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-28 08:30:26 +0000 |
commit | 190fae5f0cef11d68c7385be0c4013931796f958 (patch) | |
tree | cce10831d4b6b68b0b85787360e81e1a2cb27b8c /config | |
parent | 3f1b7b88c8d4f19a10920ad1629fc440af584d08 (diff) | |
parent | 96c4a15eae9b93a2bfb512309e860da50d2e2636 (diff) | |
download | gitlab-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.rb | 5 |
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 |