From b48909c8e130434d49796369e263b92657e3d231 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 20 Oct 2008 12:50:22 +0000
Subject: [PATCH] Convert hv_xen.py to use the logging module

Reviewed-by: imsnah
---
 lib/hypervisor/hv_xen.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/hypervisor/hv_xen.py b/lib/hypervisor/hv_xen.py
index 0ee8911fd..39730b7ca 100644
--- a/lib/hypervisor/hv_xen.py
+++ b/lib/hypervisor/hv_xen.py
@@ -26,11 +26,11 @@
 import os
 import os.path
 import time
+import logging
 from cStringIO import StringIO
 
 from ganeti import constants
 from ganeti import errors
-from ganeti import logger
 from ganeti import utils
 from ganeti.hypervisor import hv_base
 
@@ -71,8 +71,8 @@ class XenHypervisor(hv_base.BaseHypervisor):
       result = utils.RunCmd(["xm", "list"])
       if not result.failed:
         break
-      logger.Error("xm list failed (%s): %s" % (result.fail_reason,
-                                                result.output))
+      logging.error("xm list failed (%s): %s", result.fail_reason,
+                    result.output)
       time.sleep(1)
 
     if result.failed:
@@ -184,7 +184,8 @@ class XenHypervisor(hv_base.BaseHypervisor):
     # note: in xen 3, memory has changed to total_memory
     result = utils.RunCmd(["xm", "info"])
     if result.failed:
-      logger.Error("Can't run 'xm info': %s" % result.fail_reason)
+      logging.error("Can't run 'xm info' (%s): %s", result.fail_reason,
+                    result.output)
       return None
 
     xmoutput = result.stdout.splitlines()
-- 
GitLab