# HG changeset patch
# User john.levon(a)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(a)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;