Re: [libvirt] [PATCH 2/7] Add accessors for logging filters and outputs

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

 



Daniel P. Berrange wrote:  [Mon Oct 05 2009, 08:51:00AM EDT]
> On Sun, Oct 04, 2009 at 03:28:46PM -0400, Amy Griffis wrote:
> > When configuring logging settings, keep more information about the
> > output destination. Add accessors to retrieve the filter and output
> > settings in the original string form; this to be used to set up
> > environment for a child process that also logs. Open output files
> > O_APPEND so child can also write -- was there a reason to truncate
> > them?
> 
> I don't think it really matters - APPEND is fine
> 
> > Note this patch changes the API for virLogDefineOutput(), which is
> > part of the internal libvirt API, but is currently only used within
> > logging.c.
> 
> > @@ -107,12 +114,15 @@ typedef void (*virLogCloseFunc) (void *data);
> >  
> >  extern int virLogGetNbFilters(void);
> >  extern int virLogGetNbOutputs(void);
> > +extern int virLogGetFilters(virBufferPtr);
> > +extern int virLogGetOutputs(virBufferPtr);
> 
> Having looked at the wway the next patch uses these, I think it'd be
> nicer to change the contract to just be
> 
>    extern char *virLogGetFilters(void);
>    extern char *virLogGetOutputs(void);

Heh, that's how I wrote it the first time. Then I changed it to
make use of the virBuffer API, and tried to follow precedent with
the rest of libvirt. The code is not really doing much with the
string, maybe virBuffer is overkill?

Amy

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]