logging: suppress log entries that are not structured

Borrowed from the BC4 configuration.
This commit is contained in:
Mike Dalessio
2025-03-13 09:31:11 -04:00
parent d1329e7985
commit 3c2e7b8ae3
+4
View File
@@ -50,6 +50,10 @@ Rails.application.configure do
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
# No normal logs. Suppress everything that's not structured.
config.logger = ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(nil))
config.log_level = :fatal
# Structured JSON logging
config.structured_logging.logger = ActiveSupport::Logger.new(STDOUT)