Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lograge to reduce log noise #2487

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading