attempt to display timestamps during boot manager steps
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 25 Sep 2008 14:43:35 +0000 (14:43 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 25 Sep 2008 14:43:35 +0000 (14:43 +0000)
source/BootManager.py

index 1439549..fa37353 100755 (executable)
@@ -35,6 +35,8 @@ NodeRunStates = {}
 
 class log:
 
+    format="%H:%M:%S(%Z) "
+
     def __init__( self, OutputFilePath= None ):
         if OutputFilePath:
             try:
@@ -46,10 +48,11 @@ class log:
 
     
     def LogEntry( self, str, inc_newline= 1, display_screen= 1 ):
+        now=time.strftime(log.format, time.localtime())
         if self.OutputFile:
-            self.OutputFile.write( str )
+            self.OutputFile.write( now+str )
         if display_screen:
-            sys.stdout.write( str )
+            sys.stdout.write( now+str )
             
         if inc_newline:
             if display_screen: