From f22afe0644d5c7a821bd3d47b714f694ad4713c9 Mon Sep 17 00:00:00 2001 From: James Mason Date: Fri, 30 Mar 2018 15:58:53 -0700 Subject: [PATCH] Add ENV variable for production log level (cherry picked from commit f8856da0fd3c9e41330fdd09c407eb7f61b078dc) --- config/environments/production.rb | 2 +- dotenv.example | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 2a9bf1f8..357dcb55 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -40,7 +40,7 @@ Osem::Application.configure do config.force_ssl = !!ENV['FORCE_SSL'] # See everything in the log (default is :info) - config.log_level = :info + config.log_level = ENV['OSEM_LOG_LEVEL'].try(:to_sym) || :info # Prepend all log lines with the following tags # config.log_tags = [ :subdomain, :uuid ] diff --git a/dotenv.example b/dotenv.example index 10b5680b..e2ff2a10 100644 --- a/dotenv.example +++ b/dotenv.example @@ -19,6 +19,9 @@ OSEM_EMAIL_ADDRESS="no-reply@localhost" # (Optional) The Conference#short_title to redirect the root URL to #OSEM_ROOT_CONFERENCE='' +# (Optional) log level in production environment +OSEM_LOG_LEVEL='info' + # The api key for transifex.com. # See TRANSLATION.md for details OSEM_TRANSIFEX_APIKEY=""