From 523e27979291792379c403a0f19d10c41825dd09 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Fri, 22 Aug 2014 05:47:30 +0930 Subject: [PATCH] Don't fight against ourselves for the default log level If we want to always default to :debug, let's just do that. At which point the production.rb entry can become an "uncomment to change" instead. --- railties/lib/rails/application/configuration.rb | 2 +- .../rails/app/templates/config/environments/production.rb.tt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 9a6a4a52c7..2c16b83f8a 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -117,7 +117,7 @@ module Rails end def log_level - @log_level ||= Rails.env.production? ? :info : :debug + @log_level ||= :debug end def colorize_logging diff --git a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt index bbfd9505bc..2cd8040f35 100644 --- a/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +++ b/railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt @@ -44,8 +44,8 @@ Rails.application.configure do # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true - # Set to :info to decrease the log volume. - config.log_level = :debug + # Decrease the log volume. + # config.log_level = :info # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ]