Fix up a problem when flushing the WARN logs on the server side. If
a flush happens just before an END log, then the WARNs will get logged
at the same level as the END which will really confuse the parser.

Risk: Low
Visibility: WARN messages logged just before and END messages should
get logged at the same level.

Signed-off-by: John Admanski <jadmanski@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2951 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/server_job.py b/server/server_job.py
index c284055..4925614 100755
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -622,8 +622,14 @@
         """
         # poll all our warning loggers for new warnings
         warnings = self._read_warnings()
-        for timestamp, msg in warnings:
-            self._record("WARN", None, None, msg, timestamp)
+        old_record_prefix = self.record_prefix
+        try:
+            if status_code.startswith("END "):
+                self.record_prefix += "\t"
+            for timestamp, msg in warnings:
+                self._record("WARN", None, None, msg, timestamp)
+        finally:
+            self.record_prefix = old_record_prefix
 
         # write out the actual status log line
         self._record(status_code, subdir, operation, status,