This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


RE: [Xen-devel] [PATCH] tools: ocaml: fix the logging in the ocaml libxl

Dave Scott writes ("RE: [Xen-devel] [PATCH] tools: ocaml: fix the logging in 
the ocaml libxl bindings"):
> That is indeed the current behaviour -- most log messages end up dropped,
> only those which are in the buffer when the libxl call fails get bubbled
> up to the user in an exception. The main difference after my patch is
> that the code nolonger segfaults after calling (IIRC) gettopologyinfo 
> and hopefully won't blow its buffer if the logging ever gets spammy :-)

Right :-).  Fair enough.

> If you recommend changing the policy to always record/handle all log 
> messages then that sounds fine to me. From the point of view of the 
> ocaml code I can think of the following options (Vincent: do you have any
> advice?):

I think the ocaml bindings to libxl should expose the actual interface
of libxl, without messing with the semantics of errors in this way.

I don't know which of these:

> 1. add the notion of a per-call context to the ocaml and associate 
>    logging callbacks with this. The ocaml code can then do whatever it 
>    likes on a per-call basis.
> 2. allow the ocaml to set a global logging callback which would handle
>    logging from all ocaml xl calls in the same process
> 3. allow the ocaml to set some syslog logging parameters so all ocaml xl
>    calls would just log via syslog

... would be more sensible from an ocaml point of view.


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>