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

Re: [libvirt] Supressing error messages



2010/1/15 Bryan Kearney <bkearney redhat com>:
> 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


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