mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Add timestamp to Rails logger in staging and prod so that info in logs can be accurately compared with data in the DB
This commit is contained in:
@@ -36,8 +36,11 @@ Openfoodnetwork::Application.configure do
|
||||
# See everything in the log (default is :info)
|
||||
config.log_level = :info
|
||||
|
||||
# Use a different logger for distributed setups
|
||||
# config.logger = SyslogLogger.new
|
||||
# Configure logging
|
||||
Rails.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
|
||||
Rails.logger.formatter = Logger::Formatter.new
|
||||
Rails.logger.datetime_format = "%Y-%m-%d %H:%M:%S"
|
||||
config.logger = Rails.logger
|
||||
|
||||
# Use a different cache store in production
|
||||
memcached_value_max_megabytes = ENV.fetch("MEMCACHED_VALUE_MAX_MEGABYTES", 1).to_i
|
||||
|
||||
@@ -36,8 +36,11 @@ Openfoodnetwork::Application.configure do
|
||||
# See everything in the log (default is :info)
|
||||
# config.log_level = :debug
|
||||
|
||||
# Use a different logger for distributed setups
|
||||
# config.logger = SyslogLogger.new
|
||||
# Configure logging
|
||||
Rails.logger = ActiveSupport::TaggedLogging.new(Logger.new(STDOUT))
|
||||
Rails.logger.formatter = Logger::Formatter.new
|
||||
Rails.logger.datetime_format = "%Y-%m-%d %H:%M:%S"
|
||||
config.logger = Rails.logger
|
||||
|
||||
# Use a different cache store in production
|
||||
memcached_value_max_megabytes = ENV.fetch("MEMCACHED_VALUE_MAX_MEGABYTES", 1).to_i
|
||||
|
||||
Reference in New Issue
Block a user