How to quickly find restart logs

My program has a lot of logs, so the fly logs may be overwritten. It is difficult to find the reason.

I have tried the following
./main 2>>err.log
But when the panic actually occurs, the instance of the container changes, so the err.log is gone.


  1. How to distinguish whether the restart is caused by insufficient memory, or the panic is caused by a program bug
  2. How to redirect key logs to facilitate finding problems
  3. Fly logs login does not depend on the browser

Fly only stores most current logs. To store logs long term you need to send them to an external system like Logflare, Datadog, Papertrail, etc.

Fly has a log shipper app which you need to run to send logs outside: GitHub - superfly/fly-log-shipper: Ship logs from fly to other providers