diff --git a/Gemfile b/Gemfile index 7fe9c7d1..041d91f0 100644 --- a/Gemfile +++ b/Gemfile @@ -101,6 +101,10 @@ group :development, :test do gem "timecop" end +group :production do + gem "lograge" +end + gem "webpacker", "~> 5.2" gem "omniauth-rails_csrf_protection", "~> 1.0" diff --git a/Gemfile.lock b/Gemfile.lock index f624e88d..d78c6075 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -314,6 +314,11 @@ GEM listen (3.7.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) + lograge (0.11.2) + actionpack (>= 4) + activesupport (>= 4) + railties (>= 4) + request_store (~> 1.0) loofah (2.13.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -445,6 +450,8 @@ GEM redis (4.1.4) regexp_parser (2.2.0) remotipart (1.4.4) + request_store (1.5.1) + rack (>= 1.4) responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) @@ -647,6 +654,7 @@ DEPENDENCIES jbuilder (~> 2.10) jwt (~> 2.3) letter_opener + lograge mini_magick omniauth omniauth-rails_csrf_protection (~> 1.0) diff --git a/config/environments/production.rb b/config/environments/production.rb index 6ef06270..071e78ae 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -49,6 +49,9 @@ Rails.application.configure do # Prepend all log lines with the following tags. config.log_tags = [ :request_id ] + # Better log formatting + config.lograge.enabled = true + # Use a different cache store in production. # config.cache_store = :mem_cache_store