WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: David Scott <dave.scott@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] tools: ocaml: fix the logging in the ocaml libxl bindings
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Thu, 31 Mar 2011 19:01:34 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 31 Mar 2011 11:02:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <67525892e2c6ee27c254.1300913609@ely>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <67525892e2c6ee27c254.1300913609@ely>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
David Scott writes ("[Xen-devel] [PATCH] tools: ocaml: fix the logging in the 
ocaml libxl bindings"):
> tools: ocaml: fix the logging in the ocaml libxl bindings.
> 
> We now:
> 1. ensure the caml_logger fields have sensible initial values
> 2. adopt the policy that, if the messages won't fit into the buffer then
>    they are dropped and clipped is set to 1. The default buffer size is 2KiB
>    which ought to be large enough unless the logging is very spammy (which
>    is arguably a problem in itself)

Thanks, but:

 * Can you make a version where the line lengths do not exceed 75 ?
   That allows for a patch +/- column, plus a couple of levels of
   quoting, to fit in an 80-column window.

 * Now that I read this code I'm very confused.  Why does log_vmessage
   not actually output the message anywhere ?  Looking at the code,
   the buffer is printed out only if the call fails (I assume that's
   what failwith_xl is).  That's not right.  What about debugging
   output ?

   There is no guarantee that the logger will be called to report any
   particular number of messages if a libxl call fails.  Specifically,
   it may output zero error messages, or several one, before returning
   a failure code.  And it will frequently output a number of
   informational messages.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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