diff --git a/config/environments/production.rb b/config/environments/production.rb index 30215a7c..54f40706 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -125,6 +125,9 @@ Rails.application.configure do # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify + # Specify the log level + config.log_level = ENV["RAILS_LOG_LEVEL"].present? ? ENV['RAILS_LOG_LEVEL'].to_sym : :info + # Use Lograge for logging config.lograge.enabled = true @@ -141,8 +144,6 @@ Rails.application.configure do "#{time} - #{severity}: #{msg} \n" end - config.log_level = :info - # Prepend all log lines with the following tags. config.log_tags = [:request_id, :remote_ip] diff --git a/sample.env b/sample.env index 2d62c0c7..5cebc7fb 100644 --- a/sample.env +++ b/sample.env @@ -259,6 +259,11 @@ ENABLE_SSL=true # RAILS_LOG_REMOTE_PORT=9999 # RAILS_LOG_REMOTE_TAG=greenlight +# Specify the log level +# Allowed values are: debug|info|warn|error|fatal|unknown +# For details, see: https://docs.ruby-lang.org/en/master/Logger.html +#RAILS_LOG_LEVEL=info + # Database settings # # Greenlight may work out of the box with sqlite3, but for production it is recommended to use postgresql.