massa icon indicating copy to clipboard operation
massa copied to clipboard

Logging improvements

Open qdrn opened this issue 3 years ago • 6 comments

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...

qdrn avatar Jan 31 '22 09:01 qdrn

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)?

yvan-sraka avatar Feb 03 '22 21:02 yvan-sraka

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.

qdrn avatar Feb 03 '22 22:02 qdrn

This issue is stale! (no activity for 60 days)

github-actions[bot] avatar Apr 11 '22 18:04 github-actions[bot]

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.

qdrn avatar Apr 12 '22 19:04 qdrn

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 ?

litchipi avatar Mar 06 '23 09:03 litchipi

Referencing ideas : #3548 https://github.com/massalabs/massa/issues/3694

AurelienFT avatar Mar 28 '24 14:03 AurelienFT