> > An other point which is cruelly missing is a proper logging system - which is > central when debugging runtime errors. > > Thomas, do you have any thoughts about what a proper logging system would > look like? What features it would provide? I'm experimenting a little with > this already, making a logger that can write messages to the console and also > send as syslog. I'd be interested in trying to expand this and make it into > something generally useful for Mirage but would probably need a bit of > guidance to begin with. > > I'm aware of https://github.com/UnixJunkie/dolog > <https://github.com/UnixJunkie/dolog> and wondering whether this is a good > starting point, if it were functorized to accept the Mirage console signature?
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 [1] http://www-sop.inria.fr/mimosa/fp/Bigloo/doc/bigloo-17.html#Tracing <http://www-sop.inria.fr/mimosa/fp/Bigloo/doc/bigloo-17.html#Tracing> [2] https://blog.twitter.com/2012/distributed-systems-tracing-with-zipkin <https://blog.twitter.com/2012/distributed-systems-tracing-with-zipkin>
_______________________________________________ MirageOS-devel mailing list [email protected] http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
