How to switch log levels

Does someone know how to switch logs to warning/error level?
my practics show that i need logs only when bad thing happen, and then log file is over 2-3 gb and no one text redaktor can open it.
so i wold consider to see less but urgently needed information.

On Windows, PilotEdit can. The free version should be enough for reading these logs. Though, I usually just use command line.

you can configure log level in config.yaml
but i kinda like having logs atleast for some nodes…
but my logs are split into daily log files.

i usually set it to log level debug…
think some of the other options are error and warning.

can’t seem to find any documentation on it in the storj doc’s
tsk tsk… and not defined in the config.yaml notes either… tsk tsk

maybe you just use the names of the lines in the log, like warn, error and such…
then it will log everything below the one you define…

something like that…
sometimes storj documentation needs a lot of work.
this is pretty fundamental stuff.

@Alexey maybe you can help us out here…
what exactly are the log level options in the config.yaml and why can’t we seem to find that in the documentation?

We use this package, these are the levels:

I prefer to set these arguments on the command-line rather than the config file:

docker run -it storjlabs/storagenode:latest --log.level=error

To see all available storagenode arguments you can run:

docker run -it storjlabs/storagenode:latest --help

But I agree some of them need better documentation. PR welcome for here private/logging.go at 79135887c9bef0154d32fd1a26c5f0a25905acfa · storj/private · GitHub


thank you this is what I need.

There is also a way to change the log level without having to restart the node. This is useful for a hard to reproduce situation. Something is wrong on your node now but if you restart it with a different log level the restart itself would hide the root cause.

So here is how you can change the log level on the fly without a restart:
Guide to debug my storage node, uplink, s3 gateway, satellite