]> xenbits.xensource.com Git - libvirt.git/commitdiff
Print errors on daemon startup if logging setup fails
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 13 Jan 2022 13:41:03 +0000 (14:41 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 13 Jan 2022 14:43:13 +0000 (15:43 +0100)
Fixes: a873924e36b28c5b125621e35b32beb6b077bcc8
https://bugzilla.redhat.com/show_bug.cgi?id=2039652

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/locking/lock_daemon.c
src/logging/log_daemon.c
src/remote/remote_daemon.c

index ea81940a43251341459f2f568103b4ad8c61f37c..75ebd059d79ac2960ea84d3a45381452a90552a9 100644 (file)
@@ -919,8 +919,10 @@ int main(int argc, char **argv) {
                               config->log_outputs,
                               privileged,
                               verbose,
-                              godaemon) < 0)
+                              godaemon) < 0) {
+        virDispatchError(NULL);
         exit(EXIT_FAILURE);
+    }
 
     if (!pid_file &&
         virPidFileConstructPath(privileged,
index fe7fa8534aeca41f2ce79dfe33705cebde242c80..8c3eb66895dc25b4277e864f35055165484296de 100644 (file)
@@ -725,8 +725,10 @@ int main(int argc, char **argv) {
                               config->log_outputs,
                               privileged,
                               verbose,
-                              godaemon) < 0)
+                              godaemon) < 0) {
+        virDispatchError(NULL);
         exit(EXIT_FAILURE);
+    }
 
     if (!pid_file &&
         virPidFileConstructPath(privileged,
index 84157e6cc19afdfb40cc9c01a88f258fb787544c..1b8e982a2f0102c9acc322c5d4a95bb26c2aa5cd 100644 (file)
@@ -940,8 +940,10 @@ int main(int argc, char **argv) {
                               config->log_outputs,
                               privileged,
                               verbose,
-                              godaemon) < 0)
+                              godaemon) < 0) {
+        virDispatchError(NULL);
         exit(EXIT_FAILURE);
+    }
 
     /* Let's try to initialize global variable that holds the host's boot time. */
     if (virHostBootTimeInit() < 0) {