logging: suppress log entries that are not structured
Borrowed from the BC4 configuration.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user