Open omarkohl opened 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.
It makes debugging easier.
Some candidates (chosen via 10 minutes of googling):