diff --git a/config/environments/production.rb b/config/environments/production.rb index 2bd5bc27bc..ff8394a821 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -68,9 +68,7 @@ Rails.application.configure do # Prepend all log lines with the following tags. config.log_tags = [:request_id] - # "info" includes generic and useful information about system operation, but avoids logging too much - # information to avoid inadvertent exposure of personally identifiable information (PII). If you - # want to log everything, set the level to "debug". + # Change to "debug" to log everything (including potentially personally-identifiable information!) config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") # Use a different cache store in production. diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 727598011c..b344d4446e 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -35,8 +35,8 @@ Openfoodnetwork::Application.configure do # Use https in email links config.action_mailer.default_url_options = { protocol: 'https' } - # Set log level (default is :debug in Rails 4) - config.log_level = :info + # Change to "debug" to log everything (including potentially personally-identifiable information!) + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") # Configure logging: config.log_formatter = Logger::Formatter.new.tap { |f| f.datetime_format = "%Y-%m-%d %H:%M:%S" }