Improved the reboot logging to be consistent between client and server
side reboots. Also, removed the "job starting" log that was produced
every time a job moved into a new phase.

Also, timestamp logging was added on the client and server side. Any
logging done in job.record will have timestamp (time since epoch in
UTC) and localtime (human-readable local time) values added to it.

From: John Admanski <jadmanski@google.com>
Signed-off-by: Martin Bligh <mbligh@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@914 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/server_job.py b/server/server_job.py
index cd37c8d..2815c5e 100755
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -290,7 +290,16 @@
 		# detect them in the status file to ensure it is parsable.
 		status = re.sub(r"\n", "\n" + self.record_prefix + "  ", status)
 
-		msg = '%s\t%s\t%s\t%s' %(status_code, substr, operation, status)
+		# Generate timestamps for inclusion in the logs
+		epoch_time = int(time.time())  # seconds since epoch, in UTC
+		local_time = time.localtime(epoch_time)
+		epoch_time_str = "timestamp=%d" % (epoch_time,)
+		local_time_str = time.strftime("localtime=%b %d %H:%M:%S",
+					       local_time)
+
+		msg = '\t'.join(str(x) for x in (status_code, substr, operation,
+						 epoch_time_str, local_time_str,
+						 status))
 
 		status_file = os.path.join(self.resultdir, 'status.log')
 		print msg