RaspBerry move the log file

Hi, by default, on which path are the log files recorded?
I would still like to move them to a disk drive to avoid wear on the SDcard, what is the procedure?

Best regards.

https://documentation.storj.io/resources/faq/redirect-logs

Hello,
I stopped the node, I added the following string to the config.yaml file:

log.output: /mnt/usb/storj_log/node.log

I restarted the node, but there is no log file on the path set.

What does it miss…

Don’t substitute the host filesystem location in the config.yaml setting…

It should actually be

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

The log will then be accessible at the storage node’s configuration directory. From your post… it looks like that would be:

/mnt/usb/node.log

Perfect. It works.

Thanks.

Hi I have a pi4 with 2 Storj Nodes, one HDD each. Now I want the log files on a USB stick and not on the HDD’s. how could i do that

You can bind an additional mountpoint to the container and change either config.yaml or add an --log.output option to point logs to the other location inside the container.
For example, your USB stick is statically mounted to /mnt/logs, in the docker run command you bind this mountpoint to the /app/logs folder inside the container, the option log.output should be updated like this:

log.output: /app/logs/storagenode.log

Or add it to the docker run as an argument, i.e.

docker run .... --mount type=bind,source=/mnt/logs,destination=/app/logs ... storjlabs/storagenode:latest --log.output /app/logs/storagenode.log

But I would suggest to place your logs on the disk with data, like described in the Guide above. If your USB stick would fail - your logs will not be available and node could crash.

1 Like