logging: suppress unstructured log lines

This commit is contained in:
Mike Dalessio
2025-03-13 09:46:14 -04:00
parent ed92687f4c
commit 482aa90243
+3 -5
View File
@@ -50,17 +50,15 @@ Rails.application.configure do
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
# Suppress unstructured log lines
config.log_level = :fatal
# Structured JSON logging
config.structured_logging.logger = ActiveSupport::Logger.new(STDOUT)
# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]
# "info" includes generic and useful information about system operation, but avoids logging too much
# information to avoid inadvertent exposure of personally identifiable information (PII). If you
# want to log everything, set the level to "debug".
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
# Use a different cache store in production.
config.cache_store = :solid_cache_store