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 http://logs-01.loggly.com/bulk/TOKEN/tag/heroku --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.
puts '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.
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
- Heroku Automated Parsing – We automatically parse the source, dyno, and more
- Loggly Libraries Catalog – New libraries are added to our catalog
- Search or post your own Heroku tail logs questions in the community forum, read more about the Heroku app here, or visit Heroku.
Troubleshooting Heroku Logs
If you don’t see any data show up in the verification step, then check for these common problems.
- 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
- Search or post your own question in the community forum.
Still Not Working?