From: Thierry Parmentelat Date: Thu, 25 Sep 2008 14:43:35 +0000 (+0000) Subject: attempt to display timestamps during boot manager steps X-Git-Tag: BootManager-4.3-2~30 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=7d0b26ce029c74b6a7fb5d3e682eadff4d01a866;p=bootmanager.git attempt to display timestamps during boot manager steps --- diff --git a/source/BootManager.py b/source/BootManager.py index 1439549..fa37353 100755 --- a/source/BootManager.py +++ b/source/BootManager.py @@ -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: