From a5eb7789a91f605a5e1ed33a5c6d320f229338e1 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 20 Oct 2008 12:50:14 +0000 Subject: [PATCH] Convert mcpu.py to use the logging module Reviewed-by: imsnah --- lib/mcpu.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/mcpu.py b/lib/mcpu.py index 949b1e6c5..a36182658 100644 --- a/lib/mcpu.py +++ b/lib/mcpu.py @@ -28,13 +28,13 @@ are two kinds of classes defined: """ +import logging from ganeti import opcodes from ganeti import constants from ganeti import errors from ganeti import rpc from ganeti import cmdlib -from ganeti import logger from ganeti import locking @@ -217,14 +217,14 @@ class Processor(object): """Log a change in LU execution progress. """ - logger.Debug("Step %d/%d %s" % (current, total, message)) + logging.debug("Step %d/%d %s", current, total, message) self._feedback_fn("STEP %d/%d %s" % (current, total, message)) def LogWarning(self, message, hint=None): """Log a warning to the logs and the user. """ - logger.Error(message) + logging.warning(message) self._feedback_fn(" - WARNING: %s" % message) if hint: self._feedback_fn(" Hint: %s" % hint) @@ -233,7 +233,7 @@ class Processor(object): """Log an informational message to the logs and the user. """ - logger.Info(message) + logging.info(message) self._feedback_fn(" - INFO: %s" % message) -- GitLab