How do I redirect my logs to a file?

1. To redirect the logs to a file, stop your Node:

docker stop -t 300 storagenode
docker stop -t 300 storagenode

2. Then edit your config.yaml (you can use nano or vi editor for Linux/MacOS or Notepad++ for Windows) to add (or change) the log location (see Where can I find the config.yaml?):

log.output: "/app/config/node.log"
log.output: "/app/config/node.log"

You can find resulting log in the storage location.

3. Start your Node again:

docker start storagenode
docker start storagenode

When you use this option, docker logs commands no longer show your node log. Use the file instead.

Previous
Migrating from Windows GUI installation to Docker CLI