NebulousLabs / docker-sia

The official docker image for the Sia daemon

Home Page:https://sia.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Capture siad's logs

ro-tex opened this issue · comments

When Sia is running in a container we don't see its output. Let's redirect both stdout and errout to files within the data directory.

I think it'd be better to keep outputting logs to stdout and stderr so that we can get them with docker logs (or kubectl logs if the container is running with k8s).

That's a good point. I think we can have both, so even people who are not very familiar with Docker can take a look at the logs.

What I have right now is the following:

  • on container start we wipe the logs on disk
  • we redirect stderr and stdout to disk
  • we tail those back to stderr and stdout, so Docker and K8s can pick them up

If people want to preserve the logs between executions they should wrap the start of the Sia docker in a script that copies the old logs to an archive location.

Sounds good to me. Thanks!