Re: [libvirt] [PATCH] Eliminate noise from python type wrappers

2008-06-25 Thread Daniel P. Berrange
On Wed, Jun 25, 2008 at 09:10:29AM +0900, Atsushi SAKAI wrote:
 Hi, 
 
 Just a simple question.
 Why you do not turn off the DEBUG flag for libvirt build?

We actually build with DEBUG enabled by default now because we've found
it incredibly useful when debugging customer problems to be able to
ask them to just set  LIBVIRT_DEBUG=1 and get debugging data.

Daniel
-- 
|: Red Hat, Engineering, London   -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 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] Eliminate noise from python type wrappers

2008-06-25 Thread Daniel P. Berrange
On Tue, Jun 24, 2008 at 03:57:21PM -0700, Ryan Scott wrote:
 
 Hi,
 
   We recently had a virt-install build failure when someone tried 
 building on a system with debug libvirt packages installed.  It was 
 caused by extra noise from commands that load libvirt.  For example:
 
 $ python ./setup.py --version
 libvirt_virConnectPtrWrap: node = 8938fb8
 0.300.3
 
   I've seen (internal) complaints about this, and I think the 
 irritation from the noise outweighs the usefulness of these statements, 
 so they should be removed.

ACK, gets my vote. We really don't need this debug info from the data
type convertors. All the public APIs already print out their args when
LIBVIRT_DEBUG=1 is set.

Daniel
-- 
|: Red Hat, Engineering, London   -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 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] Eliminate noise from python type wrappers

2008-06-25 Thread Daniel Veillard
On Tue, Jun 24, 2008 at 03:57:21PM -0700, Ryan Scott wrote:
 
 Hi,
 
   We recently had a virt-install build failure when someone tried 
 building on a system with debug libvirt packages installed.  It was 
 caused by extra noise from commands that load libvirt.  For example:
 
 $ python ./setup.py --version
 libvirt_virConnectPtrWrap: node = 8938fb8
 0.300.3
 
   I've seen (internal) complaints about this, and I think the 
 irritation from the noise outweighs the usefulness of these statements, 
 so they should be removed.

  It's a remain from the past (actually from libxml2 code) where DEBUG
was used in a far more specific fashion and really doesn't bring any
useful information now.

  so yes this makes sense, applied and commited to CVS,

   thanks !

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard  | virtualization library  http://libvirt.org/
[EMAIL PROTECTED]  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH] Eliminate noise from python type wrappers

2008-06-24 Thread Ryan Scott


Hi,

  We recently had a virt-install build failure when someone tried 
building on a system with debug libvirt packages installed.  It was 
caused by extra noise from commands that load libvirt.  For example:


$ python ./setup.py --version
libvirt_virConnectPtrWrap: node = 8938fb8
0.300.3

  I've seen (internal) complaints about this, and I think the 
irritation from the noise outweighs the usefulness of these statements, 
so they should be removed.


Signed-off-by: Ryan Scott [EMAIL PROTECTED]


--- python/types.c.orig 2008-06-10 11:15:40.372795533 -0700
+++ python/types.c  2008-06-24 11:21:25.825967564 -0700
@@ -20,10 +20,6 @@ PyObject *
 libvirt_intWrap(int val)
 {
 PyObject *ret;
-
-#ifdef DEBUG
-printf(libvirt_intWrap: val = %d\n, val);
-#endif
 ret = PyInt_FromLong((long) val);
 return (ret);
 }
@@ -32,10 +28,6 @@ PyObject *
 libvirt_longWrap(long val)
 {
 PyObject *ret;
-
-#ifdef DEBUG
-printf(libvirt_longWrap: val = %ld\n, val);
-#endif
 ret = PyInt_FromLong(val);
 return (ret);
 }
@@ -44,10 +36,6 @@ PyObject *
 libvirt_ulongWrap(unsigned long val)
 {
 PyObject *ret;
-
-#ifdef DEBUG
-printf(libvirt_ulongWrap: val = %lu\n, val);
-#endif
 ret = PyLong_FromLong(val);
 return (ret);
 }
@@ -56,10 +44,6 @@ PyObject *
 libvirt_longlongWrap(long long val)
 {
 PyObject *ret;
-
-#ifdef DEBUG
-printf(libvirt_longWrap: val = %ld\n, val);
-#endif
 ret = PyLong_FromUnsignedLongLong((unsigned long long) val);
 return (ret);
 }
@@ -73,9 +57,6 @@ libvirt_charPtrWrap(char *str)
 Py_INCREF(Py_None);
 return (Py_None);
 }
-#ifdef DEBUG
-printf(libvirt_xmlcharPtrWrap: str = %s\n, str);
-#endif
 ret = PyString_FromString(str);
 free(str);
 return (ret);
@@ -90,9 +71,6 @@ libvirt_constcharPtrWrap(const char *str
 Py_INCREF(Py_None);
 return (Py_None);
 }
-#ifdef DEBUG
-printf(libvirt_xmlcharPtrWrap: str = %s\n, str);
-#endif
 ret = PyString_FromString(str);
 return (ret);
 }
@@ -106,9 +84,6 @@ libvirt_charPtrConstWrap(const char *str
 Py_INCREF(Py_None);
 return (Py_None);
 }
-#ifdef DEBUG
-printf(libvirt_xmlcharPtrWrap: str = %s\n, str);
-#endif
 ret = PyString_FromString(str);
 return (ret);
 }
@@ -118,9 +93,6 @@ libvirt_virDomainPtrWrap(virDomainPtr no
 {
 PyObject *ret;
 
-#ifdef DEBUG
-printf(libvirt_virDomainPtrWrap: node = %p\n, node);
-#endif
 if (node == NULL) {
 Py_INCREF(Py_None);
 return (Py_None);
@@ -136,9 +108,6 @@ libvirt_virNetworkPtrWrap(virNetworkPtr 
 {
 PyObject *ret;
 
-#ifdef DEBUG
-printf(libvirt_virNetworkPtrWrap: node = %p\n, node);
-#endif
 if (node == NULL) {
 Py_INCREF(Py_None);
 return (Py_None);
@@ -154,9 +123,6 @@ libvirt_virStoragePoolPtrWrap(virStorage
 {
 PyObject *ret;
 
-#ifdef DEBUG
-printf(libvirt_virStoragePoolPtrWrap: node = %p\n, node);
-#endif
 if (node == NULL) {
 Py_INCREF(Py_None);
 return (Py_None);
@@ -172,9 +138,6 @@ libvirt_virStorageVolPtrWrap(virStorageV
 {
 PyObject *ret;
 
-#ifdef DEBUG
-printf(libvirt_virStorageVolPtrWrap: node = %p\n, node);
-#endif
 if (node == NULL) {
 Py_INCREF(Py_None);
 return (Py_None);
@@ -190,9 +153,6 @@ libvirt_virConnectPtrWrap(virConnectPtr 
 {
 PyObject *ret;
 
-#ifdef DEBUG
-printf(libvirt_virConnectPtrWrap: node = %p\n, node);
-#endif
 if (node == NULL) {
 Py_INCREF(Py_None);
 return (Py_None);
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] Eliminate noise from python type wrappers

2008-06-24 Thread Atsushi SAKAI
Hi, 

Just a simple question.
Why you do not turn off the DEBUG flag for libvirt build?

Thanks
Atsushi SAKAI


Ryan Scott [EMAIL PROTECTED] wrote:

 
 Hi,
 
We recently had a virt-install build failure when someone tried 
 building on a system with debug libvirt packages installed.  It was 
 caused by extra noise from commands that load libvirt.  For example:
 
 $ python ./setup.py --version
 libvirt_virConnectPtrWrap: node = 8938fb8
 0.300.3
 
I've seen (internal) complaints about this, and I think the 
 irritation from the noise outweighs the usefulness of these statements, 
 so they should be removed.
 
 Signed-off-by: Ryan Scott [EMAIL PROTECTED]
 
 


--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH] Eliminate noise from python type wrappers

2008-06-24 Thread Ryan Scott

Atsushi SAKAI wrote:
Hi, 


Just a simple question.
Why you do not turn off the DEBUG flag for libvirt build?


Doing builds can be an interesting stress test, so we often have debug 
bits installed on our build servers.


-Ryan



Thanks
Atsushi SAKAI


Ryan Scott [EMAIL PROTECTED] wrote:


Hi,

   We recently had a virt-install build failure when someone tried 
building on a system with debug libvirt packages installed.  It was 
caused by extra noise from commands that load libvirt.  For example:


$ python ./setup.py --version
libvirt_virConnectPtrWrap: node = 8938fb8
0.300.3

   I've seen (internal) complaints about this, and I think the 
irritation from the noise outweighs the usefulness of these statements, 
so they should be removed.


Signed-off-by: Ryan Scott [EMAIL PROTECTED]





--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list