Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to use a single Logentries account on Heroku.

If you have multiple applications on Heroku and would like to use a single Logentries account for all of them, this is how you do it. Basically, do not use add-ons, and send all drains to your account.

  • In your Logentries account, click on Add Log
  • Select Manual
  • In the form that appears, input the following:
    • Log Name: access.log
    • Select Set: new set named myapp-{environment}, for instance myapp-staging (at least, this is how I like to name my entries)
    • Select the Plain TCP, UDP - logs are sent via syslog option
    • Click on Create Log Token

Logentries will set the log in discovery mode and assign you an URL and a port, such as

Add a Heroku syslog drain and point it to the provided url:

$ heroku drains:add syslog:// --app myapp-staging

Your log entries will now be available in the newly configured log in Logentries (you may need to hit the Logentries refresh button to see the new events).


This comment has been minimized.

Copy link

@timkinnane timkinnane commented Nov 2, 2016

So helpful. Thanks! 👍


This comment has been minimized.

Copy link

@mikebaldry mikebaldry commented Dec 14, 2016

Thank you. I've managed to do this before myself but its not very intuitive and couldn't remember the exact steps.


This comment has been minimized.

Copy link

@ctreptow ctreptow commented Mar 23, 2017

Thank you! 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment