Star us on GitHub
Star
Menu

Rails

Learn how to set up highlight.io Rails log ingestion.
1
Set up your frontend highlight.io integration.

First, make sure you've followed the frontend getting started guide.

2
Set up the Highlight Logger.

In a Rails initializer, you can replace or extend your logger with the Highlight Logger.

require "highlight" Highlight::H.new("<YOUR_PROJECT_ID>", environment: "production") do |c| c.service_name = "my-rails-app" c.service_version = "git-sha" end # you can replace the Rails.logger with Highlight's Rails.logger = Highlight::Logger.new(STDOUT) # or alternatively extend it to log with both highlightLogger = Highlight::Logger.new(nil) Rails.logger.extend(ActiveSupport::Logger.broadcast(highlightLogger))
Copy
3
Verify your backend logs are being recorded.

Visit the highlight logs portal and check that backend logs are coming in.