eco-stake / restake

Auto-compounder script for Cosmos Validators using REStake
https://restake.app
MIT License
359 stars 311 forks source link

Refactoring: use proper logging solution #779

Closed freak12techno closed 5 months ago

freak12techno commented 6 months ago

Would be nice if REStake would use the logging solution instead of timestamp(...). My suggestion is winston.

Benefits: 1) possibility to display logs in one format instead of needing to have custom helpers to format logs 2) ability to create subloggers (e.g. there can be main logger and each NetworkRunner can have a sublogger with { chain: <chain_name> } and inside all logs would have chain=<chain_name> prepended 3) all logging is done via structured entries that include not only the timestamp, but some data (see the point above) 4) ability to log into JSON (extra useful for those viewing logs via external logging solutions, like me lol), colored logs etc.

Also feel free to assign me to this, I have an idea on how to make it possible.

freak12techno commented 6 months ago

Just noticed it basically duplicates #734, but with more context.

tombeynon commented 6 months ago

@freak12techno Completely agree this is needed and has been requested a few times. It would be amazing if you could take a look, otherwise I'll prioritise. Thanks so much!