Merge pull request #9342 from demarches-simplifiees/add_env_to_control_log_level

ETQ operateur, je peux piloter le niveau de log à partir de la variable DS_LOG_LEVEL
This commit is contained in:
LeSim 2023-07-21 10:08:51 +00:00 committed by GitHub
commit aceaf24e5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -215,3 +215,7 @@ POSTGIS_EXTENSION_DISABLED=""
REDIS_CACHE_URL=""
REDIS_CACHE_SSL="enabled"
REDIS_CACHE_SSL_VERIFY_NONE="enabled"
# Setup log level, info if nil
# can be debug, info, warn, error, fatal, and unknown
DS_LOG_LEVEL='info'

View file

@ -52,7 +52,7 @@ Rails.application.configure do
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = ENV["DS_ENV"] == "staging" ? :debug : :info
config.log_level = ENV["DS_LOG_LEVEL"].presence&.to_sym || :info
# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]