As discussed on the mailing list, we implemented logging with a single
root logger and logging configurations per entry points. The entry
points affected are:

 * Autotest client
 * Autoserv
 * Scheduler

We are sending patches for each one of those entry points. Now we don't
need to 'grab' loggers anymore to log messages, only need to use the
utility functions:

logging.info('msg')
logging.debug('msg')
logging.warning('msg')
logging.error('msg')
logging.critical('msg')

Which reduces complexity of the log system, and makes it easier for
developers to log messages, just select the level, make sure the
standard logging module is loaded, and profit!

From: Lucas Meneghel Rodrigues <lmr@linux.vnet.ibm.com>
Signed-off-by: Steve Howard <showard@google.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@2915 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/client/common_lib/utils.py b/client/common_lib/utils.py
index f76b8bf..77cc68e 100644
--- a/client/common_lib/utils.py
+++ b/client/common_lib/utils.py
@@ -4,8 +4,8 @@
 
 import os, pickle, random, re, resource, select, shutil, signal, StringIO
 import socket, struct, subprocess, sys, time, textwrap, urllib, urlparse
-import warnings, smtplib
-from autotest_lib.client.common_lib import error, barrier, debug
+import warnings, smtplib, logging
+from autotest_lib.client.common_lib import error, barrier
 
 def deprecated(func):
     """This is a decorator which can be used to mark functions as deprecated.
@@ -27,9 +27,8 @@
         self.stdout_tee = stdout_tee
         self.stderr_tee = stderr_tee
         self.result = CmdResult(command)
-        self.log = debug.get_logger()
         if verbose:
-            self.log.debug("running: %s" % command)
+            logging.debug("Running '%s'" % command)
         self.sp = subprocess.Popen(command, stdout=subprocess.PIPE,
                                    stderr=subprocess.PIPE,
                                    preexec_fn=self._reset_sigpipe, shell=True,
@@ -831,7 +830,7 @@
     else:
         msg = "unable to import site module '%s', using non-site implementation"
         msg %= modulefile
-        debug.get_logger().info(msg)
+        logging.info(msg)
         obj = dummy
 
     return obj