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: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 ?

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

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