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-04-23 22:57:40 +0300
committerStan Hu <stanhu@gmail.com>2018-04-23 23:00:02 +0300
commit69246ec8d2bcbffeeb5265d16be85a158f767a4e (patch)
tree46e5cc2a484d19d9ea2e5e65ab185f15b43b6397
parentcdb5f98506aa3ca847aaf0dbcab1ef97010c29b9 (diff)
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
-rw-r--r--Gemfile.lock9
-rw-r--r--changelogs/unreleased/sh-bump-lograge.yml5
-rw-r--r--config/initializers/lograge.rb18
3 files changed, 10 insertions, 22 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index 745732f3537..e6c83ad685a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -483,10 +483,11 @@ GEM
logging (2.2.2)
little-plugger (~> 1.1)
multi_json (~> 1.10)
- lograge (0.5.1)
- actionpack (>= 4, < 5.2)
- activesupport (>= 4, < 5.2)
- railties (>= 4, < 5.2)
+ lograge (0.10.0)
+ actionpack (>= 4)
+ activesupport (>= 4)
+ railties (>= 4)
+ request_store (~> 1.0)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
diff --git a/changelogs/unreleased/sh-bump-lograge.yml b/changelogs/unreleased/sh-bump-lograge.yml
new file mode 100644
index 00000000000..65b15153a35
--- /dev/null
+++ b/changelogs/unreleased/sh-bump-lograge.yml
@@ -0,0 +1,5 @@
+---
+title: Bump lograge to 0.10.0 and remove monkey patch
+merge_request:
+author:
+type: other
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")