devserver: Use chromite's logging library
We're removing cherrypy_log_util.py and its better to just use the
chromite's version of logging.
BUG=b:186066529
TEST=./devserver.py
Cq-Depend: chromium:2856532
Change-Id: Ibec85bb3f789baf831666c04405f4291d522176a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2856530
Tested-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Ivan Brovkovich <ivanbrovkovich@chromium.org>
Commit-Queue: Amin Hassani <ahassani@chromium.org>
diff --git a/autoupdate.py b/autoupdate.py
index 9eade41..5e74422 100644
--- a/autoupdate.py
+++ b/autoupdate.py
@@ -23,12 +23,13 @@
import nebraska
import setup_chromite # pylint: disable=unused-import
-from chromite.lib.xbuddy import cherrypy_log_util
+from chromite.lib import cros_logging as logging
# Module-local log function.
def _Log(message, *args):
- return cherrypy_log_util.LogWithTag('UPDATE', message, *args)
+ return logging.info(message, *args)
+
class AutoupdateError(Exception):
"""Exception classes used by this module."""
diff --git a/builder.py b/builder.py
index 200cb35..4f22614 100644
--- a/builder.py
+++ b/builder.py
@@ -15,7 +15,7 @@
import cherrypy # pylint: disable=import-error
import setup_chromite # pylint: disable=unused-import
-from chromite.lib.xbuddy import cherrypy_log_util
+from chromite.lib import cros_logging as logging
# Relative path to the wrapper directory inside the sysroot.
@@ -34,7 +34,7 @@
# Module-local log function.
def _Log(message, *args):
- return cherrypy_log_util.LogWithTag('BUILD', message, *args)
+ return logging.info(message, *args)
def _OutputOf(command):
diff --git a/devserver.py b/devserver.py
index 9f29604..7fddaf3 100755
--- a/devserver.py
+++ b/devserver.py
@@ -54,18 +54,19 @@
# you will _not_ understand why.
import setup_chromite # pylint: disable=unused-import
from chromite.lib import cros_build_lib
+from chromite.lib import cros_logging as logging
from chromite.lib.xbuddy import android_build
from chromite.lib.xbuddy import artifact_info
from chromite.lib.xbuddy import build_artifact
-from chromite.lib.xbuddy import cherrypy_log_util
from chromite.lib.xbuddy import common_util
from chromite.lib.xbuddy import devserver_constants
from chromite.lib.xbuddy import downloader
from chromite.lib.xbuddy import xbuddy
+
# Module-local log function.
def _Log(message, *args):
- return cherrypy_log_util.LogWithTag('DEVSERVER', message, *args)
+ return logging.info(message, *args)
CACHED_ENTRIES = 12
diff --git a/devserver_integration_test.py b/devserver_integration_test.py
index 64a492f..2aee33c 100755
--- a/devserver_integration_test.py
+++ b/devserver_integration_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
diff --git a/health_checker.py b/health_checker.py
index 1f816c7..0cd13ce 100644
--- a/health_checker.py
+++ b/health_checker.py
@@ -26,13 +26,13 @@
psutil = None
import setup_chromite # pylint: disable=unused-import
+from chromite.lib import cros_logging as logging
from chromite.lib import cros_update_progress
-from chromite.lib.xbuddy import cherrypy_log_util
def _Log(message, *args):
"""Module-local log function."""
- return cherrypy_log_util.LogWithTag('HEALTHCHECKER', message, *args)
+ return logging.info(message, *args)
# Number of seconds between the collection of disk and network IO counters.
STATS_INTERVAL = 10.0