]> git.ipfire.org Git - nitsi.git/blobdiff - src/nitsi/machine.py
Format the name in the log file always with the same length
[nitsi.git] / src / nitsi / machine.py
index b49fe302f825f664629078111014df57bcb81c84..795a0b8d1a9551fbcff1d81a28d5599b18bc9ccc 100644 (file)
@@ -117,12 +117,19 @@ class machine():
 
         #serial_con.close()
 
-    def login(self):
+    def login(self, log_file, log_start_time=None, longest_machine_name=10):
         try:
-            self.serial_con = serial_connection(self.get_serial_device(), username=self.username)
+            self.serial_con = serial_connection(self.get_serial_device(),
+                                username=self.username,
+                                log_file=log_file,
+                                log_start_time=log_start_time,
+                                name=self.name,
+                                longest_machine_name=longest_machine_name)
             self.serial_con.login(self.password)
         except BaseException as e:
             self.log.error("Could not connect to the domain via serial console")
+            self.log.exception(e)
+            raise e
 
     def cmd(self, cmd):
         return self.serial_con.command(cmd)