Ruby on Rails Logs

Ruby on Rails is an open source framework for web development in Ruby. It automatically creates and maintains basic text logs for each environment, such as development, staging, and production. Despite this categorization, identifying the source of an issue isn't easy. Site24x7 natively supports Ruby on Rails logs and starts managing them as soon as you upload them in a defined format. Learn more about log management with Site24x7.

Getting started 

  1. Log in to your Site24x7 account.
  2. Download and install the Site24x7 Server Monitoring agent (Windows | Linux). 
  3. Go to Admin > AppLogs > Log Profile and Add Log Profile.

Log file path

By default, Site24x7 sources Ruby on Rails logs from the folder path mentioned below. If you have logs in a different folder, you can add that folder's file path for monitoring when creating a log profile.

{Rails_Application_Root}/logs/production.log

Log pattern

$Severity$, [$DateTime:date$ #$ProcessId:number$] $LogLevel$ -- : [$UniqueId$] $Message$

This is the default log pattern defined by Site24x7 for parsing Ruby on Rails production environment logs.

Sample log

I, [2018-07-27T03:17:11.518077 #13828] INFO -- : [f0c840c5-b0f9-4dc9-a4ac-66f18bc94f39] Processing by Api::V7::TasksController#notification_counts as JSON

The above sample log can be separated into six fields, each of which will take its respective value as the log is being uploaded to Site24x7.

Field name Filed value
Severity I
Date Time 2018-07-27T03:17:11.518077
Process ID 13828
Log Level INFO
Unique ID f0c840c5-b0f9-4dc9-a4ac-66f18bc94f39
Message Processing by Api::V7::TasksController#notification_counts as JSON
To monitor Ruby on Rails logs for a development environment, create a custom log type.

Related log types

Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.