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:
authorStan Hu <stanhu@gmail.com>2018-01-06 11:41:13 +0300
committerStan Hu <stanhu@gmail.com>2018-01-09 08:23:24 +0300
commiteaf9088ba8abe8c847a09860b55a86c7ae0d5987 (patch)
tree6aa8b076c5f598f8c0efa9ea7ef8d4e08870839a /lib/api/api.rb
parent7b2f9af4486b26512a2fefb3f385a2b8fa65a068 (diff)
Save user ID and username in Grape API log (api_json.log)
This will enable admins to identify who actually made the API request. Relates to #36960
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r--lib/api/api.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb
index e0d14281c96..ae161efb358 100644
--- a/lib/api/api.rb
+++ b/lib/api/api.rb
@@ -13,7 +13,8 @@ module API
formatter: Gitlab::GrapeLogging::Formatters::LogrageWithTimestamp.new,
include: [
GrapeLogging::Loggers::FilterParameters.new,
- GrapeLogging::Loggers::ClientEnv.new
+ GrapeLogging::Loggers::ClientEnv.new,
+ Gitlab::GrapeLogging::Loggers::UserLogger.new
]
allow_access_with_scope :api