summaryrefslogtreecommitdiff
path: root/config/initializers/lograge.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/lograge.rb')
-rw-r--r--config/initializers/lograge.rb19
1 files changed, 1 insertions, 18 deletions
diff --git a/config/initializers/lograge.rb b/config/initializers/lograge.rb
index 49fdd23064c..1cf8a24e98c 100644
--- a/config/initializers/lograge.rb
+++ b/config/initializers/lograge.rb
@@ -1,21 +1,3 @@
-# Monkey patch lograge until https://github.com/roidrage/lograge/pull/241 is released
-module Lograge
- class RequestLogSubscriber < ActiveSupport::LogSubscriber
- def strip_query_string(path)
- index = path.index('?')
- index ? path[0, index] : path
- end
-
- def extract_location
- location = Thread.current[:lograge_location]
- return {} unless location
-
- Thread.current[:lograge_location] = nil
- { location: strip_query_string(location) }
- end
- end
-end
-
# Only use Lograge for Rails
unless Sidekiq.server?
filename = File.join(Rails.root, 'log', "#{Rails.env}_json.log")
@@ -45,6 +27,7 @@ unless Sidekiq.server?
gitaly_calls = Gitlab::GitalyClient.get_request_count
payload[:gitaly_calls] = gitaly_calls if gitaly_calls > 0
+ payload[:response] = event.payload[:response] if event.payload[:response]
payload
end