A super simple Heroku log drain written in Go. Store and view Heroku app logs on your local server. It stores all received logs in a directory of your choosing, separating logs from heroku as well as from each of your dynos in separate files, with ANSI coloring.
- Copy the repository
- Copy
.env_template
to.env
and change to your liking - Get an SSL certificate and template (e.g. from https://letsencrypt.org)
- Run the program on your server:
go run main.go
- Ask Heroku to send copy of logs to drain:
heroku drains:add -a herokuappname https://example.com:8443/log
The software works perfectly for my personal use cases so I don't expect there to be much activity in the repository in the future. However, the software is actively maintained and I expect to answer any issues or PRs in a reasonable timeframe.
- Fields such as the hostname and message facility are not stored in the logs as to my knowledge Heroku does not use these
- Directory and file permissions stored in
.env
are not used. The program defaults to 0755/0644 for directories/iles - HTTP authentication is not implemented, but defining the log drain token filters any log messages sent without it
- To view the coloring properly in
less
, run it asless -r filename.log
- Duplicate detection via the frame-ID header has not been implemented