Ensure log level is the default :info for staging and production

The default was being ignored in our new logging configuration, and the actual log output was way too high. This was causing serious disk space issues.
This commit is contained in:
Matt-Yorkley
2020-03-17 12:25:25 +01:00
committed by Pau Perez
parent b5dddd0842
commit 9e3371625d
2 changed files with 2 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ Openfoodnetwork::Application.configure do
# Configure logging for Rails 3.2:
config.logger = ActiveSupport::TaggedLogging.new(Logger.new(Rails.root.join("log", "#{Rails.env}.log")))
config.logger.level = Logger::INFO
config.logger.formatter = Logger::Formatter.new
config.logger.datetime_format = "%Y-%m-%d %H:%M:%S"
# Once we get to Rails 4.0, we can replace the above with:

View File

@@ -38,6 +38,7 @@ Openfoodnetwork::Application.configure do
# Configure logging for Rails 3.2:
config.logger = ActiveSupport::TaggedLogging.new(Logger.new(Rails.root.join("log", "#{Rails.env}.log")))
config.logger.level = Logger::INFO
config.logger.formatter = Logger::Formatter.new
config.logger.datetime_format = "%Y-%m-%d %H:%M:%S"
# Once we get to Rails 4.0, we can replace the above with: