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

Re: [Xen-devel] [PATCH RFC 1/8] golang/xenlight: Create stub package



On 26/01/17 10:44, Ian Jackson wrote:
> George Dunlap writes ("Re: [Xen-devel] [PATCH RFC 1/8] golang/xenlight: 
> Create stub package"):
>> I think the fastest thing to do to begin with would be to create a
>> "null" logger that just throws away all the data.  Then at some point
>> (possibly not in your internship) someone can think about what a
>> proper logging interface looks like.
> 
> Please don't just throw away all the messages.  For now, have your C
> code make the stdiostream logger to send the messages to stderr.

After I wrote this I also came to the conclusion that it would be pretty
important to have the messages available for debugging purposes.

My main concern here was that I wasn't sure how glibc's stdiostream
would interact with Go's iostream: They might have different sets of
buffers, for instance, which would cause garbled output.  But it looks
like Go by default doesn't buffer stdout/stderr; and the stdiostream
logger flushes output  after each message as well.  So using stdiostream
sounds like a good starting point (although it will need to be replaced
before we consider the library production-ready).

Ronald, you can look in tools/libxl/xl.c to see an example of how to
make an stdiostream logger to pass to libxl_ctx_alloc().

 -George



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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