massa
massa copied to clipboard
Logging improvements
Currently setting the log level to 4 crashes the node as there is a lot of logs. It would be interesting to be able to set a log level per module so that people are able to monitor what's going on at the module level to debug desync issues, etc...
That's possible! DO you want a mechanism where logs levels are set at compile time or define/override at runtime (in a config file or an ENV variable)?
I don't have a strong opinion on this. I'd say it's a bit more flexible to be able to override it at runtime but since it's a niche usage anyway I don't think it matters too much.
This issue is stale! (no activity for 60 days)
If it's not too much work it would be nice to do it at some point as we often use logs to debug smart-contracts.
Doesn't the RUST_LOG
filter per module help in this matter ?
https://docs.rs/env_logger/latest/env_logger/#filtering-results
It doesn't filter the module you want to debug if you pass RUST_LOG=massa_network_worker
or so ?
Referencing ideas : #3548 https://github.com/massalabs/massa/issues/3694