Compare commits

...

2 Commits

Author SHA1 Message Date
Matt-Yorkley
9e3371625d 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.
2020-03-17 15:00:57 +01:00
Matt-Yorkley
b5dddd0842 Add comments for unusable log_level setting 2020-03-17 14:55:24 +01:00
2 changed files with 4 additions and 2 deletions

View File

@@ -33,11 +33,12 @@ Openfoodnetwork::Application.configure do
# Use https in email links
config.action_mailer.default_url_options = { protocol: 'https' }
# See everything in the log (default is :info)
# Note: This config no longer works with our new logging strategy
# config.log_level = :debug
# 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

@@ -33,11 +33,12 @@ Openfoodnetwork::Application.configure do
# Use https in email links
config.action_mailer.default_url_options = { protocol: 'https' }
# See everything in the log (default is :info)
# Note: This config no longer works with our new logging strategy
# config.log_level = :debug
# 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: