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

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

 



# HG changeset patch
# User john.levon@xxxxxxx
# 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@xxxxxxx>

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;

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]