]> git.proxmox.com Git - pve-installer.git/commitdiff
auto installer: log: implement flush
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 19 Apr 2024 10:21:59 +0000 (12:21 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 Apr 2024 12:31:37 +0000 (14:31 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-auto-installer/src/log.rs

index 50635ae8864877a15b4d59a8524e11224313303d..67accc4d672c57cc68ea5e43b67d4c7ec6182bf1 100644 (file)
@@ -34,5 +34,13 @@ impl log::Log for AutoInstLogger {
         }
     }
 
-    fn flush(&self) {}
+    fn flush(&self) {
+        LOGFILE
+            .get()
+            .expect("could not get LOGFILE")
+            .lock()
+            .expect("could not get mutex for LOGFILE")
+            .flush()
+            .expect("could not flush LOGFILE");
+    }
 }