Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Heroku logs for past few weeks

Tags:

logging

heroku

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.

like image 268
Varun Avatar asked Oct 11 '10 07:10

Varun


People also ask

How do I view old Heroku logs?

You can view logs with the Heroku CLI, the dashboard, your logging add-on, or in your log drain.

What does Heroku logs -- tail mean?

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.)

What timezone are Heroku logs in?

Heroku uses the UTC timezone for its logs by default.

What is the purpose of the command Heroku logs?

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.


1 Answers

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

like image 112
rtfminc Avatar answered Sep 22 '22 00:09

rtfminc