On Fri, Jul 26, 2013 at 07:38:31AM -0400, Daniel J Walsh wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I can't seem to get the error reporting to turn on, what am I doing wrong.,
>
> if (virInitialize() < 0) {
> fprintf(stderr, _("Failed to initialize libvirt"));
> return EXIT_FAILURE;
> }
>
> if (virErrorInitialize() < 0) {
> fprintf(stderr, _("Failed to initialize libvirt Error Handling"));
> return EXIT_FAILURE;
> }
>
> virSetErrorFunc(NULL, NULL);
>
>
> virReportSystemError(EINVAL, "%s", _("Test"));
>
> And I get no output, I thought I would get error on stderr?
You would, except that you just turned off printing to stderr by
calling virSetErrorFunc in that way.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list