Heroku command-line plugin to tail and search logs
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
commands Rename topic pt -> papertrail Jul 27, 2015
README.md Remove deprecation warning May 28, 2015
index.js Rename topic pt -> papertrail Jul 27, 2015
package.json Bump version to 1.0.2 Jul 28, 2015


Papertrail Heroku plugin

Extends heroku command-line app to display, tail, and search Heroku app and platform logs on Papertrail.


$ heroku plugins:install heroku-papertrail

The plugin includes all required dependencies.


$ heroku pt [-t] [query]

  -t      # continually stream logs (tail)
  query   # Boolean search filter

$ heroku addons:open papertrail


Add Papertrail's Heroku log management add-on to your app(s), then run heroku pt. Examples:

$ heroku pt


$ heroku pt -t

Specify a Heroku app name, tail, and show only logs containing router:

$ heroku pt --app wopr -t router

Create shortcuts to invoke CLI or open Web interface:

$ alias logs="heroku pt --app wopr -t"
$ logs JoshuaController

$ alias pt="heroku addons:open --app wopr papertrail"
$ pt

Advanced Examples

To search for quoted phrases, enclose entire query in double quotes (consistent with other shell tools):

$ heroku pt "'Sent mail to' cron"
$ heroku pt -t "'status=50' OR 'Completed in'"

Use parenthesis and exclusion (-):

$ heroku pt --app wopr -t "'State changed' OR (router ('status=50' OR 'Error H'))"
$ heroku pt "router -'queue=0'"

More: Search syntax