summaryrefslogtreecommitdiff
path: root/config/initializers/lograge.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-04-23 12:57:40 -0700
committerStan Hu <stanhu@gmail.com>2018-04-23 13:00:02 -0700
commit69246ec8d2bcbffeeb5265d16be85a158f767a4e (patch)
tree46e5cc2a484d19d9ea2e5e65ab185f15b43b6397 /config/initializers/lograge.rb
parentcdb5f98506aa3ca847aaf0dbcab1ef97010c29b9 (diff)
downloadgitlab-ce-69246ec8d2bcbffeeb5265d16be85a158f767a4e.tar.gz
Bump lograge to 0.10.0 and remove monkey patch
lograge 0.10.0 contains the `Location` query string fix in https://github.com/roidrage/lograge/pull/241 among other minor changes: https://github.com/roidrage/lograge/blob/master/CHANGELOG.md
Diffstat (limited to 'config/initializers/lograge.rb')
-rw-r--r--config/initializers/lograge.rb18
1 files changed, 0 insertions, 18 deletions
diff --git a/config/initializers/lograge.rb b/config/initializers/lograge.rb
index 49fdd23064c..114c1cb512f 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")