Added debug log
authorThierry Florac <tflorac@ulthar.net>
Fri, 06 Mar 2015 18:51:15 +0100
changeset 14 a4cf46dc5634
parent 13 e84adc865c35
child 15 79a35932c5cc
Added debug log
src/pyams_utils/registry.py
--- a/src/pyams_utils/registry.py	Fri Mar 06 18:50:54 2015 +0100
+++ b/src/pyams_utils/registry.py	Fri Mar 06 18:51:15 2015 +0100
@@ -14,6 +14,9 @@
 
 
 # import standard library
+import logging
+logger = logging.getLogger('PyAMS (utils)')
+
 import venusian
 
 # import interfaces
@@ -106,6 +109,10 @@
                     raise TypeError("Missing 'provides' argument")
 
             config = context.config.with_package(info.module)
+            logger.debug("Registering utility {0} named '{1}' providing {2}".format(
+                str(component) if component else str(factory),
+                settings.get('name', ''),
+                str(provides)))
             config.registry.registerUtility(component=component, factory=factory,
                                             provided=provides, name=settings.get('name', ''))