vocdoni-node icon indicating copy to clipboard operation
vocdoni-node copied to clipboard

Reduce ipfsSync log messages

Open p4u opened this issue 2 years ago • 0 comments

In DEBUG mode currently ipfsSync and its packages are flooding the log output so its very hard to find other (probably more relevant) messages.

I'd suggest to somehow add a flag to the vocdoni-node in order to configure the ipfsSync log output independently.

I'm not sure how to do that with the current log implementation, probably we need to extend the log package somehow and allow creating origin tags by log type and then be able to configure different log levels per origin. Something like:

main.go

log.SetOriginLogLevel("ipfsSync", "info")

ipfsSync.go

logger := log.WithOrigin("ipfsSync")
logger.Debugf("...")

@mvdan could probably help us here to find the best solution

p4u avatar Feb 02 '22 10:02 p4u