How to get full production.log from rails application in heroku?

I would like to study my production.log in detail, but the hero doesn't seem to store them. Does anyone else have a solution to this problem. It would be nice if it were safely preserved. thanks in advance:)

+3
source share
3 answers

From the Heroku doc, you can see that their logger is limited to the last 100 lines whenever you read them from the console.

If you have a requirement to store and analyze all your production logs, it looks like you will have to consider archiving them with Heroku, say, on S3 or through the EC2 log server.

+3
source

Heroku , 1500 . heroku logs 100 .

heroku logs -n 1500

, Heroku Logplex, , Heroku. ,

heroku logs -n 1500 --source app
+3

This will work in heroku, do this from your terminal:

heroku logs -n 200

or

heroku logs -t --app <app_name> > any_file_name

Here the max limit -nis 1500

+2
source

Source: https://habr.com/ru/post/1754572/


All Articles