Lumberaxe handles logging output formatting.
After installing the gem, require it as part of your application configuration.
# application.rb
require "lumberaxe/railtie"
To set up JSON logging on puma, add this to your puma config:
# puma.rb
require "lumberaxe"
log_formatter(&Lumberaxe.puma_formatter)
If you don't have a tool for parsing JSON in local development, you can add this:
# development.rb
config.logger = ActiveSupport::TaggedLogging.new(Logger.new($stdout))