[Xen-devel] [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function families.

2016-11-15 Thread Cédric Bosdonnat
From: Cédric Bosdonnat These functions should be used to log messages when the domain id is known. libxl__log will now prepend the log message by "Domain %PRIu32:" if the domain id is a valid one. This aims at helping consumers filter logs on domain IDs. Signed-off-by: Cédric Bosdonnat --- to

Re: [Xen-devel] [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function families.

2016-11-17 Thread Wei Liu
On Tue, Nov 15, 2016 at 11:18:39AM +0100, Cédric Bosdonnat wrote: > From: Cédric Bosdonnat > > These functions should be used to log messages when the domain > id is known. libxl__log will now prepend the log message by > "Domain %PRIu32:" if the domain id is a valid one. > > This aims at helpin

Re: [Xen-devel] [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function families.

2016-11-17 Thread Cedric Bosdonnat
On Thu, 2016-11-17 at 14:41 +, Wei Liu wrote: > On Tue, Nov 15, 2016 at 11:18:39AM +0100, Cédric Bosdonnat wrote: > > From: Cédric Bosdonnat > > > > These functions should be used to log messages when the domain > > id is known. libxl__log will now prepend the log message by > > "Domain %PRIu

Re: [Xen-devel] [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function families.

2016-11-17 Thread Wei Liu
On Thu, Nov 17, 2016 at 05:01:08PM +0100, Cedric Bosdonnat wrote: > On Thu, 2016-11-17 at 14:41 +, Wei Liu wrote: > > On Tue, Nov 15, 2016 at 11:18:39AM +0100, Cédric Bosdonnat wrote: > > > From: Cédric Bosdonnat > > > > > > These functions should be used to log messages when the domain > > >

Re: [Xen-devel] [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function families.

2016-11-17 Thread Ian Jackson
Cedric Bosdonnat writes ("Re: [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function families."): > On Thu, 2016-11-17 at 14:41 +, Wei Liu wrote: > > You should be able to use ao->domid here, right? > > Oh indeed. I discovered this one after writing this patch and forgot > about it here. Co

Re: [Xen-devel] [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function families.

2016-11-17 Thread Wei Liu
On Thu, Nov 17, 2016 at 04:29:35PM +, Ian Jackson wrote: > Cedric Bosdonnat writes ("Re: [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D > function families."): > > On Thu, 2016-11-17 at 14:41 +, Wei Liu wrote: > > > You should be able to use ao->domid here, right? > > > > Oh indeed. I di

Re: [Xen-devel] [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function families.

2016-11-17 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function families."): > Oh, yes. I misunderstood. In that case libxl_is_stubdom could be handy. How about this: check whether the ao is a nested ao, and if so, fish the domid out of its parent ? Ian. __

Re: [Xen-devel] [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function families.

2016-11-17 Thread Wei Liu
On Thu, Nov 17, 2016 at 04:36:54PM +, Ian Jackson wrote: > Wei Liu writes ("Re: [PATCH 01/35] libxl: add LIBXL_LOGD_* and LOG*D function > families."): > > Oh, yes. I misunderstood. In that case libxl_is_stubdom could be handy. > > How about this: check whether the ao is a nested ao, and if s