Re: [libvirt] [PATCH] 4/8 convert virterror to the logging infrastructure

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

 



On Wed, Dec 17, 2008 at 04:25:55PM +0000, Daniel P. Berrange wrote:
> On Wed, Dec 17, 2008 at 04:19:47PM +0100, Daniel Veillard wrote:
> >   Basically having the debug information in one place and the errors
> > in another place is not very helpful, so this plugs the virterror
> > handling into the logging routine. mostly a bit of refactoring,
> > and calling virLogMessage. Just that we pass an extra flag to
> > virLogMessage stating it comes from the error handling level to avoid
> > outputting the error twice on stderr in case where there is no
> > output defined.
> 
> Yep, makes sense.
> 
> > @@ -392,6 +411,12 @@
> >      }
> >  
> >      /*
> > +     * Hook up the error or warning to the logging facility
> > +     */
> > +    virLogMessage(virErrorDomainName(domain), virErrorLevelPriority(level),
> > +                  1, "%s", str);
> > +
> > +    /*
> >       * Save the information about the error
> >       */
> >      virResetError(to);
> 
> Hmm, but later on down the file we still call virDefaultErrorFunc()
> which would log the message a second time surely ?

  To the application using libvirt, but not to the logs file. The
potential annoyance is when you get both going to stderr for example
if using virsh.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
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]