mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-10 03:30:22 +00:00
Add request_id to logs for production and staging
It will prepend a request unique id to each log lines, it makes it easier to debug individual request.
This commit is contained in:
@@ -40,6 +40,7 @@ Openfoodnetwork::Application.configure do
|
||||
|
||||
# Configure logging:
|
||||
config.log_formatter = Logger::Formatter.new.tap { |f| f.datetime_format = "%Y-%m-%d %H:%M:%S" }
|
||||
config.log_tags = [:request_id]
|
||||
|
||||
# Use a different cache store in production
|
||||
config.cache_store = :redis_cache_store, {
|
||||
|
||||
@@ -40,6 +40,7 @@ Openfoodnetwork::Application.configure do
|
||||
|
||||
# Configure logging:
|
||||
config.log_formatter = Logger::Formatter.new.tap { |f| f.datetime_format = "%Y-%m-%d %H:%M:%S" }
|
||||
config.log_tags = [:request_id]
|
||||
|
||||
# Use a different cache store in production
|
||||
config.cache_store = :redis_cache_store, {
|
||||
|
||||
Reference in New Issue
Block a user