Rename client/common_lib/logging.py to client/common_lib/log.py in order to be able to use the standard python logging module
Python has a standard module used to perform logging operations
(http://docs.python.org/lib/module-logging.html) that could be used
inside autotest, however we have a common_lib module named logging as
well, that makes difficult to import the python logging module in all
other parts of autotest (including tests).
So this patch basically renames logging to log and fixes all references
to it. All the files touched were pylinted and basic sanity testing was
made (running autotest with different control files).
About the risks, in my opinion it's worth the effort, since we gain the
ability to use a powerful logging library, that would help us to
implement a better logging system inside all autotest modules.
Risk: Medium/High - Even though care was taken to ensure all references
to logging were changed, it touches a fair bit of the code and something
might have passed unaudited.
Visibility: Low - Should be invisible for all users, and developers must
just remember that now logging is called log.
Signed-off-by: Lucas Meneghel Rodrigues <lucasmr@br.ibm.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@2193 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/bin/kernel.py b/client/bin/kernel.py
index dd68fb3..77f4ddc 100755
--- a/client/bin/kernel.py
+++ b/client/bin/kernel.py
@@ -2,7 +2,7 @@
from autotest_lib.client.bin.fd_stack import tee_output_logdir_mark
from autotest_lib.client.bin import kernel_config, os_dep, kernelexpand, test
from autotest_lib.client.bin import autotest_utils
-from autotest_lib.client.common_lib import logging, utils, error, packages
+from autotest_lib.client.common_lib import log, utils, error, packages
class kernel(object):
@@ -130,7 +130,7 @@
return patches
- @logging.record
+ @log.record
@tee_output_logdir_mark
def extract(self, base_tree):
if os.path.exists(base_tree):
@@ -144,7 +144,7 @@
self.patch(*base_components)
- @logging.record
+ @log.record
@tee_output_logdir_mark
def patch(self, *patches):
"""Apply a list of patches (in order)"""
@@ -154,7 +154,7 @@
self.apply_patches(self.get_patches(patches))
- @logging.record
+ @log.record
@tee_output_logdir_mark
def config(self, config_file = '', config_list = None, defconfig = False):
self.set_cross_cc()
@@ -229,7 +229,7 @@
utils.system('sed "%s" < Makefile.old > Makefile' % p)
- @logging.record
+ @log.record
@tee_output_logdir_mark
def build(self, make_opts = '', logfile = '', extraversion='autotest'):
"""build the kernel
@@ -283,7 +283,7 @@
raise error.TestError(errmsg)
- @logging.record
+ @log.record
@tee_output_logdir_mark
def clean(self):
"""make clean in the kernel tree"""
@@ -292,7 +292,7 @@
utils.system('make clean > /dev/null 2> /dev/null')
- @logging.record
+ @log.record
@tee_output_logdir_mark
def mkinitrd(self, version, image, system_map, initrd):
"""Build kernel initrd image.
@@ -340,7 +340,7 @@
self.build_image = image
- @logging.record
+ @log.record
@tee_output_logdir_mark
def install(self, tag='autotest', prefix = '/'):
"""make install in the kernel tree"""
@@ -618,7 +618,7 @@
self.installed_as = None
- @logging.record
+ @log.record
@tee_output_logdir_mark
def install(self, tag='autotest'):
self.installed_as = tag