Make Your Logs Work for You

The days of logging in to servers and manually viewing log files are over. SolarWinds® Papertrail™ aggregates logs from applications, devices, and platforms to a central location.

View Technology Info


Troubleshoot Fast and Enjoy It

SolarWinds® Papertrail™ provides cloud-based log management that seamlessly aggregates logs from applications, servers, network devices, services, platforms, and much more.

View Capabilities Info


Aggregate and Search Any Log

SolarWinds® Papertrail™ provides lightning-fast search, live tail, flexible system groups, team-wide access, and integration with popular communications platforms like PagerDuty and Slack to help you quickly track down customer problems, debug app requests, or troubleshoot slow database queries.

View Languages Info


TBD - APM Integration Title

TBD - APM Integration Description

TBD Link

APM Integration Feature List

TBD - Built for Collaboration Title

TBD - Built for Collaboration Description

TBD Link

Built for Collaboration Feature List

Blog > Searching Rails logs – a few favorite queries

Searching Rails logs – a few favorite queries

Posted by By telliott on July 5, 2011

A fringe benefit of using Papertrail for searching our logs all the time is that we get lots of experience creating queries. Here’s 5 that might be applicable to those with Ruby on Rails log files (like production.log), plus links to try them in your Papertrail account.

The best searches are always going to be the ones you create around your own logs or already use grep and tail for, but these are a start. And although these are are specific to Rails, the same data is logged by most Web frameworks.

1. Non-GET requests

What: Requests using common HTTP methods other than GET. For most Web apps, covers user logins, signups, and other form submissions (meaningful changes, searches).

Query: ” [POST]” OR ” [PUT]” OR ” [DELETE]” (Try it in your account)

2. Filtered form values

What: All form submissions with blocked values (passwords, credit cards)

Query: [FILTERED] (Try it)

3. Unusual HTTP responses

What: HTTP responses other than success (200) and temporary redirect (302). This includes 401 authentication required, 406 not acceptable, and anything else your app returns.

Query: “Completed in” -200 -302 (Try it)

4. Nonexistent paths

What: Requests for nonexistent paths that hit your Rails app (rather than for static assets)

Query: ActionController::RoutingError (Try it)

5. Exceptions

What: Logs related to exceptions, both user-facing and backend processing

Query: (exception OR Error) -Completed -Parameters (Try it)