Preserve loggers names for log.custom-level

Since storagenode ver. 1.99.x, it is possible to set custom log level for the majority of loggers (services, walkers, etc.).
The problem is that newer versions are modifying the names of those loggers, making the command obsolete without SNO’s knowledge.
For ex., in storagenode version 1.101.3, the used-space-filewalker is renamed piecestore:cache. Also, more walkers (like trash) are added or renamed.
This creates problems for operators that don’t use log rotation, or don’t want huge logs, and just disable the unwanted loggers. Many operators don’t monitor the logs, expecting they remain small, behaving how they were set in run command.
So, for maximum compatibility, PLEASE stop changing the names of loggers, services and walkers, and properly inform with a pinned post when a new walker or service is added, to let SNO’s take proper action, and set new log custom levels.
Thanks!

3 Likes

Where did you see this ?

1 Like

In my log, version 1.101.3:

 INFO  piecestore:cache  Startup piece scan omitted by configuration  {"Process": "storagenode"}

I disabled lazy FW and used space FW, so I believe this reffers to it. I don’t see other entry with the name used-space-filewalker. I recreated the container with new parameters, just to put the log.level to info.

Run command:

--log-driver json-file \
--log-opt max-size=10m \
--log-opt max-file=5 \
--name storagenode storjlabs/storagenode:latest \
...
--log.level=info \
--log.custom-level=piecestore=FATAL,collector=ERROR \
--pieces.enable-lazy-filewalker=false \
 --storage2.piece-scan-on-startup=false

Check out this code

peer.Storage2.CacheService = pieces.NewService(
			process.NamedLog(log, "piecestore:cache"),
			peer.Storage2.BlobsCache,
			peer.Storage2.Store,
			config.Storage2.CacheSyncInterval,
			config.Storage2.PieceScanOnStartup,
		)

At any time a setting referring to BlobsCache, Store, CacheSyncInterval or PieceScanOnStartup is encountered, its mentioned in the log with piecestore:cache.

As you can see, you have stopped Piece-Scan-On-Startup which is reflected in the log. Also renaming used-space-filewalker to piecestore:cache makes zero sense.

PS: @devs please correct me if I am wrong.

3 Likes

So if I enable used-space-filewalker, there should be an entry like used-space-filewalker started and used-space-filewalker finished in the log? If so, it’s OK than. Sorry for rising a non-existing problem.
But it’s confusing… Anyway, I can sleep better now knowing that my run command won’t become obsolete any time soon. Thanks!

2 Likes

It seems confusing to a non technical person but I appreciate you making the post. This will help anyone else who may have the same logic :slight_smile:

2 Likes

I sent this question to the team, even if I agree with @nerdatwork.

1 Like