WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Added a TRACE log level, for those versions of Python th

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Added a TRACE log level, for those versions of Python that do not have it, and
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Oct 2005 13:52:21 +0000
Delivery-date: Mon, 17 Oct 2005 13:50:04 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 446aa56ca4fee7d3ea2badfb59e8bb3540b507ae
# Parent  fa0faada967bfc34cfc3626bc44a6a183e9206f3
Added a TRACE log level, for those versions of Python that do not have it, and
moved XendDomainInfo.update's debugging onto that level, as it has become
overly verbose.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r fa0faada967b -r 446aa56ca4fe tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Oct 17 10:36:36 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Oct 17 12:50:28 2005
@@ -24,6 +24,7 @@
 
 """
 
+import logging
 import string
 import time
 import threading
@@ -38,7 +39,6 @@
 from xen.xend import sxp
 from xen.xend import XendRoot
 from xen.xend.XendBootloader import bootloader
-from xen.xend.XendLogging import log
 from xen.xend.XendError import XendError, VmError
 from xen.xend.XendRoot import get_component
 
@@ -101,6 +101,9 @@
 
 xc = xen.lowlevel.xc.new()
 xroot = XendRoot.instance()
+
+log = logging.getLogger("xend.XendDomainInfo")
+#log.setLevel(logging.TRACE)
 
 
 ## Configuration entries that we expect to round-trip -- be read from the
@@ -802,7 +805,7 @@
         """Update with info from xc.domain_getinfo().
         """
 
-        log.debug("XendDomainInfo.update(%s) on domain %d", info, self.domid)
+        log.trace("XendDomainInfo.update(%s) on domain %d", info, self.domid)
 
         if not info:
             info = dom_get(self.domid)
@@ -813,7 +816,7 @@
         self.validateInfo()
         self.refreshShutdown(info)
 
-        log.debug("XendDomainInfo.update done on domain %d: %s", self.domid,
+        log.trace("XendDomainInfo.update done on domain %d: %s", self.domid,
                   self.info)
 
 
diff -r fa0faada967b -r 446aa56ca4fe tools/python/xen/xend/XendLogging.py
--- a/tools/python/xen/xend/XendLogging.py      Mon Oct 17 10:36:36 2005
+++ b/tools/python/xen/xend/XendLogging.py      Mon Oct 17 12:50:28 2005
@@ -25,6 +25,14 @@
 
 __all__ = [ 'log', 'init', 'getLogFilename', 'addLogStderr',
             'removeLogStderr' ]
+
+
+if not 'TRACE' in logging.__dict__:
+    logging.TRACE = logging.DEBUG - 1
+    logging.addLevelName(logging.TRACE,'TRACE')
+    def trace(self, *args, **kwargs):
+        self.log(logging.TRACE, *args, **kwargs)
+    logging.Logger.trace = trace
 
 
 log = logging.getLogger("xend")

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Added a TRACE log level, for those versions of Python that do not have it, and, Xen patchbot -unstable <=