allow log levels to be configurable via ENV

This commit is contained in:
Georg Gadinger 2023-02-04 07:07:43 +01:00
parent cb064e8acf
commit 1f4a92b6d4
3 changed files with 10 additions and 2 deletions

View File

@ -51,6 +51,10 @@ Rails.application.configure do
config.action_mailer.perform_caching = false config.action_mailer.perform_caching = false
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = ENV.fetch("LOG_LEVEL") { "debug" }.to_sym
# Print deprecation notices to the Rails logger. # Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log config.active_support.deprecation = :log

View File

@ -45,7 +45,7 @@ Rails.application.configure do
# Use the lowest log level to ensure availability of diagnostic information # Use the lowest log level to ensure availability of diagnostic information
# when problems arise. # when problems arise.
config.log_level = :debug config.log_level = ENV.fetch("LOG_LEVEL") { "info" }.to_sym
# Prepend all log lines with the following tags. # Prepend all log lines with the following tags.
config.log_tags = [ :request_id ] config.log_tags = [ :request_id ]

View File

@ -34,6 +34,10 @@ Rails.application.configure do
# ActionMailer::Base.deliveries array. # ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test config.action_mailer.delivery_method = :test
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = ENV.fetch("LOG_LEVEL") { "debug" }.to_sym
# Print deprecation notices to the stderr. # Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr config.active_support.deprecation = :stderr