Support Logging setup

                      Heroku Logs

                      Heroku Logs

                      You can send your Heroku logs by adding a drain to Loggly. We will automatically parse the logs as well. For alternatives on Heroku log analysis, please see the Advanced Options section.

                      Heroku Logging Setup

                      1. Add A Drain

                      Use drain to send your heroku application logs to loggly. Follow below command to send logs.

                      heroku drains:add --app HEROKU_APP_NAME


                      • TOKEN: your customer token from the source setup page
                      • HEROKU_APP_NAME: the name of your Heroku application

                      2. Send Test Logs

                      Send some test logs to Loggly. If you’re using a logger library in your respective technology, set it up on Heroku to log to stdout.

                      Ruby sample

                      puts 'hello logs'

                      Java sample

                      System.out.println("hello logs");

                      3. Verify Events

                      Search Loggly for events with the heroku tag over the past 20 minutes. It may take a few minutes to index the event. If it doesn’t work, see the troubleshooting section below.


                      Heroku Log Example
                      Click on one of the logs to show a list of syslog fields. If you don’t see them, please check that you are using one of our automatically parsed formats.

                      Advanced Heroku Logging Options

                      Troubleshooting Heroku Logs

                      If you don’t see any data show up in the verification step, then check for these common problems.

                      Check heroku:

                      • Wait a few minutes in case indexing needs to catch up
                      • Run the “heroku drains” command to verify Heroku has created the drain
                      • Run the “heroku logs” command to verify Heroku has received the logs you sent
                      • Try curling an event to the bulk endpoint to verify Loggly is able to receive your events

                      Still Not Working?

                      Thanks for the feedback! We'll use it to improve our support documentation.