As Anil said, I don't thing re-using dolog is a good idea (dolog serves its purposes nicely but it is not what we want as a general logging library for MirageOS). I have not yet a very clear idea of what we should do, but I plan to spend some time soon to come up with a more concrete proposal.
Few remarks:
- I'm in favour of designing something from scratch
- I also don't particularly like the usual warn/debug/info/error stuff (I tend to use debug/error only anyway)
- Using Irmin is a good idea if it's available but I'd like to not enforce it as a dependency if possible
- I'm not a big fan of passing the logging function as an argument as this means you need to thread it everywhere (and if you want to add some logging to a function, you'll need to change its type) so the design of Lwt_log is compelling - but need to thing a bit more about that
- I quite like the "with-trace" function of bigloo[1] and I found it quite useful in practice (although I would replace the trace level by some section names that you could turn-off/on dynamically and/or statically)
- It is always hard to find the right balance of things to log or to not log and I'm not sure how we can have a general solution for this without runtime control. Spamming the log traces is very useful when you debug and or when you try to fix a weird production issue, but you also want to be fast and avoid DoS ...
- I also quite liked reading stuff about Finagle/Zipkin[2] (although I never used it in practice) and that would be quite nice if we had a similar logging story for MirageOS
- If anyone knows a good existing logging library that they used in other languages, I'm keen to have a look.
Best,
Thomas