[libvirt] Reporting log/error messages through capabilities

Daniel P. Berrange berrange at redhat.com
Wed Feb 19 14:00:21 UTC 2014


On Tue, Feb 18, 2014 at 11:11:10PM +0000, Richard W.M. Jones wrote:
> There is a libvirt bug here, which is that it's very hard to diagnose
> what is going on when qemu fails to work at all.  The logging system
> in libvirt(d) is trememdously powerful, but ultimately confusing to
> use, and requires users to edit config files which makes it a
> non-starter for programs using libvirt through the API [1].

The problem with allowing apps to change the logging config is that
it is global state, not per client. So multiple apps would conflict
in what they could do with changes here. While we could probably
make it possible for apps to register their own callback to receive
log messages, the setting of actual log levels would still be global.

> [1] By the way, this is a general complaint about libvirt.  Please
> DON'T add any more stuff to the configuration file.  Everything should
> be configurable through the API, or not at all.  There are two other
> settings I can think of that libguestfs would like to adjust but
> cannot because they are only available in a configuration file.

What are the other settings you're thinking of here ? The stuff in the
global config file is primarily intended for things that are globally
affecting libvirt behaviour and so would not be appropriate for individual
apps to change independantly. Or for things where we want to make global
defaults tweakable, but still allow app overrides - eg  VNC listen
address is global, but still tweakable in XML per VM.

Regards,
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 :|




More information about the libvir-list mailing list