[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Added a TRACE log level, for those versions of Python that do not have it, and
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |