From f18dbb6f50f61140c944b39f6c3480a518f3a839 Mon Sep 17 00:00:00 2001 From: Zee <50284+zspencer@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:39:10 -0700 Subject: [PATCH] Tame our log output (#2679) Tame our Produciton log output This brings our production logs to a more browsable starting point --- Gemfile | 1 + Gemfile.lock | 8 ++++++++ config/environments/production.rb | 1 + 3 files changed, 10 insertions(+) diff --git a/Gemfile b/Gemfile index cd60e5a29..190c813eb 100644 --- a/Gemfile +++ b/Gemfile @@ -104,6 +104,7 @@ gem "sidekiq" # Error reporting in production gem "sentry-rails" gem "sentry-ruby" +gem "lograge" # Demo data gem "factory_bot_rails" diff --git a/Gemfile.lock b/Gemfile.lock index f816bc93d..305e03156 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -243,6 +243,11 @@ GEM rb-inotify (~> 0.9, >= 0.9.10) lockbox (2.0.0) logger (1.6.1) + lograge (0.14.0) + actionpack (>= 4) + activesupport (>= 4) + railties (>= 4) + request_store (~> 1.0) loofah (2.23.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) @@ -387,6 +392,8 @@ GEM regexp_parser (2.9.2) reline (0.5.10) io-console (~> 0.5) + request_store (1.7.0) + rack (>= 1.4) rexml (3.3.9) rotp (6.3.0) rouge (4.4.0) @@ -564,6 +571,7 @@ DEPENDENCIES jsbundling-rails listen (~> 3.9) lockbox (= 2.0.0) + lograge lookbook (>= 2.0.0.beta.4) money-rails pagy (~> 9.1) diff --git a/config/environments/production.rb b/config/environments/production.rb index cba64bf28..8d474dd26 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -54,6 +54,7 @@ # Prepend all log lines with the following tags. config.log_tags = [:request_id] + config.lograge.enabled = true # Use a different cache store in production. # config.cache_store = :mem_cache_store