dbuenzli / logs

Logging infrastructure for OCaml
http://erratique.ch/software/logs
ISC License
87 stars 19 forks source link

Add a "trace" reporting level #29

Closed timothee-haudebourg closed 4 years ago

timothee-haudebourg commented 4 years ago

Hi,

It would be nice to have at least one reporting level below "debug" whose purpose would be to dump very fine grain log data. In the Rust equivalent of this library, it is the "trace" level.

dbuenzli commented 4 years ago

It seems to me that Debug is enough for that.

There are thousands of opinions about which log levels should exist and their semantics. The ones provided by this library have been chosen after consulting a few dozen of logging libraries and there's no plans to change them (except maybe introducing a Quiet level for other reasons).

The levels and their usage semantics are described here. They allow to quickly chose which level is suitable when you are programming, with your proposal I would constantly be thinking whether I should Trace or Debug this condition and that's not a question I want to have in my mind.

Also note that log message tags allow you to make further intra-level distinctions if you really want to.