[libvirt] [PATCH] daemon: Add early libvirtd start verbose errors.
Daniel P. Berrange
berrange at redhat.com
Fri Aug 12 09:08:18 UTC 2011
On Thu, Aug 11, 2011 at 02:18:15PM +0200, Peter Krempa wrote:
> Early errors during start of libvirtd didn't have
> an error reporting mechanism and caused libvirtd
> to exit silently (only the return value indicated
> an error). This patch adds error messages printed
> to stderr if verbose parameter is specified to the
> daemon.
>
> fixes: https://bugzilla.redhat.com/show_bug.cgi?id=728654
> ---
> daemon/libvirtd.c | 40 ++++++++++++++++++++++++++++++++--------
> 1 files changed, 32 insertions(+), 8 deletions(-)
Part of the problem I see here is that we don't initialized the
libvirt logging framework until quite late in startup sequence,
due to the need to the read the config file.
If we added a call to virLogSetFromEnv() right at the start of
libvirtd, then we'd get a basic logging setup activated, and
so can just use VIR_ERROR everywhere, instead of a mixture
of fprintf(stderr) and VIR_ERROR. The default logging setup
for VIR_ERROR will printf to stderr anyway.
This will mean you can override the logging destination from
environment variables more effectively.
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