cleodora-forecasting / cleodora

🔮📈 Making, tracking and improving personal forecasts (e.g. the weather tomorrow or your salary in 2 years).
https://cleodora.org
Other
22 stars 1 forks source link

Add a logger / logging package #493

Open omarkohl opened 1 year ago

omarkohl commented 1 year ago

It makes debugging easier.

Some candidates (chosen via 10 minutes of googling):

omarkohl commented 1 year ago

The above links recommend not to use a global logger but instead pass it into the functions or make it a struct field. Also it should be an interface, at least for the parts of the application that could be used as a library to avoid clients being forced to rely on the same logging library. You should only use levels DEBUG and INFO.