2010/1/15 Bryan Kearney <[email protected]>:
> When using the java library, we are seeing libvirt error messages spit out..
> such as:
>
> libvir: Remote error : unable to connect to '/var/run/libvirt/libvirt-sock':
> No such file or directory
>
> Is there a means of supressing that logging via the api?
>
> -- bk
>

Yes.

The default error callback prints this messages to stderr.

Use virSetErrorFunc to replace the default error callback with your
custom one. For example like this

static void
dummyErrorHandler(void *userData, virErrorPtr error) { }
...
virSetErrorFunc(NULL, dummyErrorHandler);

Matthias

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to