iotaledger / bee

A framework for IOTA nodes, clients and applications in Rust
Apache License 2.0
276 stars 85 forks source link

Logs cleanup and harmonisation #956

Closed thibault-martinez closed 2 years ago

thibault-martinez commented 2 years ago
grtlr commented 2 years ago

Maybe it would also help to define what each of the levels stand for. Currently we are using the following log levels: error, warn, info, debug, and trace.

error and warn are probably self-explanatory, but the distinction between debug and info is a bit trickier. In my opinion, info should only contain messages that are essential to the user. Here is a list of things that I think fit the info level well:

But the log also contains things that are less important to the user:

One thing that's common to these is that they notify about the state of certain subcomponents of Bee. However, most users don't even know what these components are, so maybe we should move those to debug?

Adam-Gleave commented 2 years ago

In my opinion, info should only contain messages that are essential to the user

Definitely agree, although I guess not necessarily essential to the user, but they should be something the user might want and would understand. The second group there look more appropriate for debug logs to me.