Skip to content

Commit

Permalink
Use lograge to reduce log noise (#2487)
Browse files Browse the repository at this point in the history
  • Loading branch information
benlovell authored Feb 29, 2024
1 parent 4e0596f commit 8520098
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ gem 'debt_free_day_calculator', '~> 4.1.0'
gem 'debt_test', '~> 1.9.0'
gem 'decision_trees', '~> 2.3.0'
gem 'feedback', '~> 0.5.1'
gem 'lograge'
gem 'mortgage_calculator', '~> 4.6.0'
gem 'pacs', '~> 4.2'
gem 'payday_loans_intervention', '~> 1.9.0'
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,11 @@ GEM
letter_opener (1.6.0)
launchy (~> 2.2)
link_header (0.0.8)
lograge (0.14.0)
actionpack (>= 4)
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -873,6 +878,7 @@ DEPENDENCIES
kss
letter_opener
link_header
lograge
mail
mailjet
mas-cms-client (= 1.20.1)
Expand Down
6 changes: 6 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ def set_tool_instance; end

private

def append_info_to_payload(payload)
super

payload[:params] = request.filtered_parameters
end

def redirect_page(e)
redirect_to e.location, status: e.http_response.status
end
Expand Down
1 change: 1 addition & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Rails.application.configure do
config.lograge.enabled = true

# Code is not reloaded between requests.
config.cache_classes = true
Expand Down

0 comments on commit 8520098

Please sign in to comment.