What I want to have: all logs in JSON format, with additional tags and per-request tags (similar to java's MDC)
How to make it:
- Use
logragewithlogstash-eventto change default request logs - Make custom log formatter
- Override
ActiveSupport::TaggedLoggingformat - Add own error handlers with
config.exceptions_app = self.routes - Override default logger at the right time
Use environment variables JSON_LOGGER = true/false and RAILS_LOG_LEVEL = info / debug / etc