[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] [Caml-list] [ANN] Logs 0.4.2

Daniel BÃnzli <daniel.buenzli@xxxxxxxxxxxx> writes:

> Hello,  
> I'd like to announce the first release of Logs. Here's the blurb:
>   Logs provides a logging infrastructure for OCaml. Logging is performed 
>   on sources whose reporting level can be set independently. Log message 
>   report is decoupled from logging and is handled by a reporter.
>   A few optional log reporters are distributed with the base library and 
>   the API easily allows to implement your own. 
>   Logs depends only on the `result` compatibility package. The optional 
>   `Logs_stdo` reporter on standard outputs depends on Fmt. The optional
>   `Logs_browser` reporter that reports to the web  browser console depends 
>   on js_of_ocaml. The optional `Logs_cli` library that provides command line
>   support for controlling Logs depends on `Cmdliner`.
>   Logs and its reporters are distributed under the BSD3 license.
> Feedback on the API is welcome, it could still change a bit before 
> stabilizing on a 1.0.0 release. 
> Homepage: http://erratique.ch/software/logs
> API docs: http://erratique.ch/software/logs/doc
> The continuation based formatting trick used by Logs for minimizing 
> non-logging overhead is based on Jeremy Yallop's findings; Gabriel
> Radanne helped to make further tests. Thanks to them and see [1] for the full 
> discussion.
> Best, 
> Daniel
> [1] https://github.com/mirage/ocaml-git/pull/130#issue-111278246

I poked around the documentation a bit but I wasn't quite clear on if
Logs provides a synchronous or asynchronous API.

I've found that in most logging frameworks, people prefer asynchronous
semantics because it's fast (just toss it in a queue and then do the
rest of your program).  IME, on production services, logging needs to be
synchronous.  That is, the log call should not return until the logging
endpoint has processed it, whatever that may be.  This is because, when
things go south, all one has is logs and maybe a core dump if they are
lucky so any behaviour that lets the program get beyond what it has
logged is providing an incomplete picture.  On top of that, when logging
a lot one will run out of space if it is purely async.

MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.