Extract the logging decorator used in kernel.py into a common library
and add it to Autotest.install to provide logging of autotest
installation failure (and success).

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



git-svn-id: http://test.kernel.org/svn/autotest/trunk@937 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/autotest.py b/server/autotest.py
index 481a147..48b638d 100644
--- a/server/autotest.py
+++ b/server/autotest.py
@@ -26,6 +26,7 @@
 import installable_object
 import errors
 import utils
+from common import logging
 
 
 AUTOTEST_SVN  = 'svn://test.kernel.org/autotest/trunk/client'
@@ -56,6 +57,9 @@
 	This is a leaf class in an abstract class hierarchy, it must
 	implement the unimplemented methods in parent classes.
 	"""
+	job = None
+
+
 	def __init__(self, host = None):
 		self.host = host
 		self.got = False
@@ -64,6 +68,7 @@
 		super(Autotest, self).__init__()
 
 
+	@logging.record
 	def install(self, host = None):
 		"""
 		Install autotest.  If get() was not called previously, an 
diff --git a/server/server_job.py b/server/server_job.py
index 1e81e4c..f756a41 100755
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -31,6 +31,7 @@
 from subcommand import *
 from utils import run, get_tmp_dir, sh_escape
 
+autotest.Autotest.job = job
 hosts.SSHHost.job = job
 """