Merge pull request #13564 from mkllnk/config-log

Make log-level configurable in staging
This commit is contained in:
Maikel
2025-10-08 13:24:56 +11:00
committed by GitHub
2 changed files with 3 additions and 5 deletions

View File

@@ -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.

View File

@@ -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" }