I see how to view heroku logs live
heroku logs -t
and how to view the last n
logs e.g.
heroku logs -n 500
would show the last 500 lines of logs. But the n
can only be so large because heroku simply doesn't store them (forever). For example, I tried heroku logs -n 5000
and I get about 1500 lines of logs, but no more.
So suppose I wanted to be able to view logs from farther back, what would I have to do to make them available? Is there some heroku setting/addon I need to implement in order for them to be permanently made available? Or is it the application layer's responsibility to store logs somewhere (e.g. persist them in a database)?