[debug] improve debug messages stable
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Mon, 26 Jul 2010 15:04:47 +0200
branchstable
changeset 6014 a5e22657f6f4
parent 6011 b5f15098f282
child 6016 0eabedcfb0a9
[debug] improve debug messages
cwvreg.py
vregistry.py
--- a/cwvreg.py	Mon Jul 26 12:07:00 2010 +0200
+++ b/cwvreg.py	Mon Jul 26 15:04:47 2010 +0200
@@ -616,7 +616,7 @@
                                    or iface
                                    for iface in ifaces)
                 if not ('Any' in ifaces or ifaces & implemented_interfaces):
-                    self.debug('kicking appobject %s (no implemented '
+                    self.debug('unregister %s (no implemented '
                                'interface among %s)', obj, ifaces)
                     self.unregister(obj)
             # since 3.9: remove appobjects which depending on other, unexistant
@@ -625,14 +625,14 @@
                 try:
                     registry = self[regname]
                 except RegistryNotFound:
-                    self.debug('kicking %s (no registry %s)', obj, regname)
+                    self.debug('unregister %s (no registry %s)', obj, regname)
                     self.unregister(obj)
                     continue
                 for regid in regids:
                     if registry.get(regid):
                         break
                 else:
-                    self.debug('kicking %s (no %s object in registry %s)',
+                    self.debug('unregister %s (no %s object in registry %s)',
                                obj, ' or '.join(regids), regname)
                     self.unregister(obj)
         super(CubicWebVRegistry, self).initialization_completed()
--- a/vregistry.py	Mon Jul 26 12:07:00 2010 +0200
+++ b/vregistry.py	Mon Jul 26 15:04:47 2010 +0200
@@ -372,7 +372,7 @@
         for registryname in class_registries(obj, registryname):
             registry = self.setdefault(registryname)
             registry.register(obj, oid=oid, clear=clear)
-            self.debug('registered appobject %s in registry %s with id %s',
+            self.debug('register %s in %s[\'%s\']',
                        vname, registryname, oid or class_regid(obj))
         self._loadedmods.setdefault(obj.__module__, {})[classid(obj)] = obj