Re: [libvirt] Supressing error messages

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

 



2010/1/15 Bryan Kearney <bkearney@xxxxxxxxxx>:
> 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
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]