]> cat aescling's git repositories - mastodon.git/commitdiff
Allows setting log level in env variable (#1290)
authorAsh Furrow <ash@ashfurrow.com>
Sat, 8 Apr 2017 23:42:13 +0000 (19:42 -0400)
committerEugen <eugen@zeonfederated.com>
Sat, 8 Apr 2017 23:42:13 +0000 (01:42 +0200)
* Allows setting log level in env variable.

* Made changes based on feedback in #1290.

config/environments/production.rb

index dc5dd4afd4c075b8e2ee51b42996266ff833f273..d299e4f4ca4859adce6126f1c619937b3a3164cd 100644 (file)
@@ -38,9 +38,9 @@ Rails.application.configure do
   # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
   config.force_ssl = false
 
-  # Use the lowest log level to ensure availability of diagnostic information
+  # By default, use the lowest log level to ensure availability of diagnostic information
   # when problems arise.
-  config.log_level = :debug
+  config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'debug').to_sym
 
   # Prepend all log lines with the following tags.
   config.log_tags = [:request_id]