Rails.application.configure do return unless config.x.json_logs # See https://github.com/roidrage/lograge for more information on how to configure the gem # This only configures logs to be formatted as JSON when lograge is enabled but you can do much more with it, # like annotating logs with user IDs config.lograge.enabled = true config.lograge.formatter = Lograge::Formatters::Logstash.new end