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

Re: [Xen-devel] per-domain logging



Hi Ian and Wei,

On Mon, 2016-09-19 at 16:23 +0100, Ian Jackson wrote:
> Cedric Bosdonnat writes ("Re: [Xen-devel] per-domain logging"):
> > On Thu, 2016-09-15 at 16:11 +0100, Wei Liu wrote:
> > > IIRC there is already logfile abstraction inside libvirt -- can you just
> > > pass in a libvirt logfile fd and try to demux there?
> > 
> > 
> > The abstraction we have is something similar to the XenToolLogger,
> > not something abstracting the log files. Even if we had that, how
> > could we demux since there is no domain name in the libxl messages.

I came up with a commit on the libvirt side writing a custom xtl_logger
that demuxes the log messages. Here it is for the curious ones:

https://github.com/cbosdo/libvirt/commit/5e28dd67c52a49b11635167469a8b60dcb4e287c

This way, libvirt would put all log messages containing ': Domain %u:' in a
separate log file and all non-matching messages would go to the default
libxl-driver.log file.

> Right.
> 
> It's not trivial to change the xtl API because there is no
> negotiation, just a vops structure.  I can think of a way to do it,
> but do we want to make all xtl logger users (that is, all generators
> of log messages) pass a domid ?
> 
> Do we want to extend this to other information ?  (Not sure _what_
> other information.)
> 
> Alternatively, we could have libxl (and perhaps libxc) put the domid
> in a standard format in the message, so it could be extracted ?
> 
> However we do it, we would have to add a domid to every LOG call in
> libxl.

Attached is a partial attempt at this that I wrote to test my libvirt code.
How does that sound to you? Should I continue like this? Obviously I surely
missed a few log messages that could get a domid, but it seems that even libxl
has log messages that can't have a domid.

--
Cedric

Attachment: 0001-libxl-format-the-domain-id-in-log-messages.patch
Description: Text Data

_______________________________________________
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®.