From 5232ad3f4e69f02090aaccce37785de822f2356c Mon Sep 17 00:00:00 2001 From: Ben Lovell Date: Thu, 29 Feb 2024 15:40:55 +0000 Subject: [PATCH] Use lograge to reduce log noise --- Gemfile | 1 + Gemfile.lock | 6 ++++++ app/controllers/application_controller.rb | 6 ++++++ config/environments/production.rb | 1 + 4 files changed, 14 insertions(+) diff --git a/Gemfile b/Gemfile index 57f54c7f5..8233b49b7 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/Gemfile.lock b/Gemfile.lock index 60d256e03..8daef621b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -873,6 +878,7 @@ DEPENDENCIES kss letter_opener link_header + lograge mail mailjet mas-cms-client (= 1.20.1) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 1bab8c3b2..67cabd732 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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 diff --git a/config/environments/production.rb b/config/environments/production.rb index 8b1188b30..43cc99daa 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,4 +1,5 @@ Rails.application.configure do + config.lograge.enabled = true # Code is not reloaded between requests. config.cache_classes = true