[libvirt] [PATCH] Set syslog logging priority based on LIBVIRT_DEBUG

# HG changeset patch # User john.levon@sun.com # Date 1232478815 28800 # Node ID a9c75296e1d6e09947a231fa9864d67a543979eb # Parent 37a6a671e38d7f4449d3b47bc5cf06c19362bc41 Set syslog logging priority based on LIBVIRT_DEBUG Currently, qemud in daemonized is dropping all messages below level 3, regardless of LIBVIRT_DEBUG setting. Signed-off-by: John Levon <john.levon@sun.com> diff --git a/qemud/qemud.c b/qemud/qemud.c --- a/qemud/qemud.c +++ b/qemud/qemud.c @@ -2151,10 +2151,15 @@ qemudSetLogging(virConfPtr conf, const c */ GET_CONF_STR (conf, filename, log_outputs); if (log_outputs == NULL) { - if (godaemon) - virLogParseOutputs("3:syslog:libvirtd"); - else + if (godaemon) { + char *tmp = NULL; + if (virAsprintf (&tmp, "%d:syslog:libvirtd", log_level) < 0) + goto free_and_fail; + virLogParseOutputs (tmp); + VIR_FREE (tmp); + } else { virLogParseOutputs("0:stderr:libvirtd"); + } } else virLogParseOutputs(log_outputs); ret = 0;

On Tue, Jan 20, 2009 at 11:14:35AM -0800, john.levon@sun.com wrote:
# HG changeset patch # User john.levon@sun.com # Date 1232478815 28800 # Node ID a9c75296e1d6e09947a231fa9864d67a543979eb # Parent 37a6a671e38d7f4449d3b47bc5cf06c19362bc41 Set syslog logging priority based on LIBVIRT_DEBUG
Currently, qemud in daemonized is dropping all messages below level 3, regardless of LIBVIRT_DEBUG setting.
Good idea, +1 Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel Veillard
-
john.levon@sun.com