Heroku log drain setup

You’ll need: Heroku CLI

  1. Set up the log drain in Heroku CLI

    Run this command in a terminal window.

    heroku drains:add "http://<<LISTENER-HOST>>:8081?token=<<SHIPPING-TOKEN>>" -a <<HEROKU-APP-NAME>>

    Replace <<SHIPPING-TOKEN>> with the token of the account you want to ship to.

    Replace <<LISTENER-HOST>> with your region’s listener host (for example, listener.logz.io). For more information on finding your account’s region, see Account region.

    Replace <<HEROKU-APP-NAME>> with the name of the app in Heroku.

    You can add custom fields to each log message, allowing you to identify different Heroku apps and filter your data in Logz.io. To do this, add &<<KEY>>=<<VALUE>> to the end of the Logz.io URL.

  2. Check Logz.io for your logs

    Give your logs a few minutes to get from your system to ours, and then open Kibana to confirm you’re shipping logs.

If you still don’t see your logs, see log shipping troubleshooting.