Use cros_logging instead of cros_build_lib.Warning

Replace all instances of cros_build_lib.Warning with
cros_logging.warning in crostestutils.

BUG=brillo:600
TEST=trybot

Change-Id: Iac63e2d75c8b8174af77ef0fbc318be238b7957e
Reviewed-on: https://chromium-review.googlesource.com/262229
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Ralph Nathan <ralphnathan@chromium.org>
Trybot-Ready: Ralph Nathan <ralphnathan@chromium.org>
Tested-by: Ralph Nathan <ralphnathan@chromium.org>
diff --git a/au_test_harness/au_test.py b/au_test_harness/au_test.py
index 527f9cc..9dd0c03 100644
--- a/au_test_harness/au_test.py
+++ b/au_test_harness/au_test.py
@@ -10,7 +10,6 @@
 import unittest
 import urllib
 
-from chromite.lib import cros_build_lib
 from chromite.lib import cros_logging as logging
 from chromite.lib import dev_server_wrapper
 from crostestutils.au_test_harness import cros_test_proxy
@@ -54,7 +53,7 @@
       # Will raise ValueError if expected is not found.
       if re.search(re.escape(expected_msg), err.output, re.MULTILINE):
         return
-      cros_build_lib.Warning("Didn't find %r in:\n%s", expected_msg, err.output)
+      logging.warning("Didn't find %r in:\n%s", expected_msg, err.output)
 
     self.fail('We managed to update when failure was expected')
 
diff --git a/au_test_harness/au_worker.py b/au_test_harness/au_worker.py
index 4d260dc..51f9dd2 100644
--- a/au_test_harness/au_worker.py
+++ b/au_test_harness/au_worker.py
@@ -215,7 +215,7 @@
       kwds['log_stdout_to_file'] = os.path.join(log_directory, 'update.log')
     result = cros_build_lib.RunCommand(cmd, **kwds)
     if result.returncode != 0:
-      cros_build_lib.Warning(result.output)
+      logging.warning(result.output)
       raise update_exception.UpdateException(result.returncode, 'Update failed')
 
   def AssertEnoughTestsPassed(self, unittest, output, percent_required_to_pass):
diff --git a/au_test_harness/vm_au_worker.py b/au_test_harness/vm_au_worker.py
index fa22a04..a799e13 100644
--- a/au_test_harness/vm_au_worker.py
+++ b/au_test_harness/vm_au_worker.py
@@ -11,6 +11,7 @@
 import constants
 from chromite.cbuildbot import constants as buildbot_constants
 from chromite.lib import cros_build_lib
+from chromite.lib import cros_logging as logging
 from crostestutils.au_test_harness import au_worker
 from crostestutils.au_test_harness import update_exception
 
@@ -71,19 +72,17 @@
     try:
       shutil.copytree(log_directory, fail_directory)
     except shutil.Error as e:
-      cros_build_lib.Warning(
-          'Ignoring errors while copying logs: %s', e)
+      logging.warning('Ignoring errors while copying logs: %s', e)
 
     # Copy VM state. This includes the disk image, and the memory
     # image.
     try:
       _, mem_image_path = tempfile.mkstemp(
-        dir=fail_directory, prefix="%s." % buildbot_constants.VM_MEM_PREFIX)
+          dir=fail_directory, prefix="%s." % buildbot_constants.VM_MEM_PREFIX)
       self._KillExistingVM(self._kvm_pid_file, save_mem_path=mem_image_path)
       shutil.move(self.vm_image_path, fail_directory)
     except shutil.Error as e:
-      cros_build_lib.Warning(
-          'Ignoring errors while copying VM files: %s', e)
+      logging.warning('Ignoring errors while copying VM files: %s', e)
 
   def UpdateImage(self, image_path, src_image_path='', stateful_change='old',
                   proxy_port='', private_key_path=None):