[libvirt] [PATCH] 4/8 convert virterror to the logging infrastructure
Daniel P. Berrange
berrange at redhat.com
Wed Dec 17 16:25:55 UTC 2008
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 :|
More information about the libvir-list
mailing list