I'm trying to get the production logs for the past few weeks off of heroku but when I do heroku logs, it just returns a few lines showing the production log for today.
Any way to get heroku logs for the past few weeks?
Thanks.
You can view logs with the Heroku CLI, the dashboard, your logging add-on, or in your log drain.
But you'll have to fetch the logs yourself, and that's what heroku logs is for. (And the --tail bit, I'd guess, means leave the log process running and show more logs as they are written.)
Heroku uses the UTC timezone for its logs by default.
First, to see a real-time stream of application events across all dynos and all layers of the application/stack use the heroku logs -t command to tail output to your terminal.
Any number up to 500 lines can now be retrieved using the -n flag.
heroku logs -n 420
As well you can also run:
heroku logs -t
And let that run for a while.
EDIT: And you can use third party tools like papertrail. See : papertrail link
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With