What is the equivalent of `/var/log/messages` in the fly.io firecracker VM's

So I have an Elixir application I’ve been deploying ‘heroku’ style. It been going well, but recently I needed to debug an issue on prod.

In the past I’ve used Centos images. When I need to debug on them I can remote in and use the :dbg module then observer the traces from /var/log/messages.

However I can’t find any file of the same function when I remote into my fly instance via flyctl ssh console.

Is there such a file? How do others approach this is there a work around or another way of doing this ad-hoc tracing on live?

Thanks in Advance!

1 Like

Hi,

I guess where the logs live (if anywhere) would depend on what base image is being used. Since you can deploy using a Dockerfile, you can put pretty much whatever you want in there.

However the general approach is to output logs to stdout, rather than to an actual file.

The appeal of that is then they can be sent to a central place, rather than being per-vm (handy if your app has multiple vms). You can access a tail of the latest X lines from your app using flyctl logs or there is (or was) an equivalent in the Fly dashboard to see the same thing.

Or you can ship them off to an external service e.g Exporting Logs · Fly Docs Since the provided logs tail would only show the most recent lines, not ones from hours ago (which you may need for debugging).

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.