* [PATCH]Remove XendLogging dependency from xswatch
@ 2008-05-21 5:36 Zhigang Wang
2008-05-21 13:10 ` Daniel P. Berrange
0 siblings, 1 reply; 2+ messages in thread
From: Zhigang Wang @ 2008-05-21 5:36 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 366 bytes --]
Hi,
xstransact and xswatch are well designed python interface that can be used by
third party utils rather than only in xend. But the logging approach here binds
xswatch to xend and prevent it from being used by other utils.
This patch removes the dependency on XendLogging from xswatch.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
regards,
zhigang
[-- Attachment #2: xen-xswatch-logging.patch --]
[-- Type: text/x-patch, Size: 1097 bytes --]
Remove XendLogging dependency from xswatch
xstransact and xswatch are well designed python interface that can be used by
third party utils rather than only in xend. But the logging approach here binds
xswatch to xend and prevent it from being used by other utils.
This patch removes the dependency on XendLogging from xswatch.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
--- xen-unstable.orig/tools/python/xen/xend/xenstore/xswatch.py 2008-05-12 16:43:52.000000000 +0800
+++ xen-unstable/tools/python/xen/xend/xenstore/xswatch.py 2008-05-21 13:14:58.000000000 +0800
@@ -9,8 +9,6 @@ import errno
import threading
from xen.xend.xenstore.xsutil import xshandle
-from xen.xend.XendLogging import log
-
class xswatch:
@@ -76,7 +74,7 @@ def watchMain():
else:
raise
except:
- log.exception("read_watch failed")
+ pass
# Ignore this exception -- there's no point throwing it
# further on because that will just kill the watcher thread,
# which achieves nothing.
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH]Remove XendLogging dependency from xswatch
2008-05-21 5:36 [PATCH]Remove XendLogging dependency from xswatch Zhigang Wang
@ 2008-05-21 13:10 ` Daniel P. Berrange
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrange @ 2008-05-21 13:10 UTC (permalink / raw)
To: Zhigang Wang; +Cc: xen-devel
On Wed, May 21, 2008 at 01:36:11PM +0800, Zhigang Wang wrote:
> Hi,
>
> xstransact and xswatch are well designed python interface that can be used by
> third party utils rather than only in xend. But the logging approach here binds
> xswatch to xend and prevent it from being used by other utils.
>
> This patch removes the dependency on XendLogging from xswatch.
Instead of doing
from xen.xend.XendLogging import log
...
log.debug("Blah")
All the code could just use Python's real logging API directly avoiding
the Xen specific code which doesn't really add any value here. eg
import logging
logging.debug("Blah")
Dan.
--
|: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-21 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 5:36 [PATCH]Remove XendLogging dependency from xswatch Zhigang Wang
2008-05-21 13:10 ` Daniel P. Berrange
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.