Changed logging
authorThierry Florac <thierry.florac@onf.fr>
Mon, 02 Mar 2015 10:02:27 +0100
changeset 5 930e6bc44d7d
parent 4 be32c837e341
child 6 09a8799da676
Changed logging
src/pyams_utils/adapter.py
--- a/src/pyams_utils/adapter.py	Sat Feb 28 16:18:26 2015 +0100
+++ b/src/pyams_utils/adapter.py	Mon Mar 02 10:02:27 2015 +0100
@@ -14,6 +14,9 @@
 
 
 # import standard library
+import logging
+logger = logging.getLogger('PyAMS (utils)')
+
 import venusian
 
 # import interfaces
@@ -80,6 +83,9 @@
                     raise TypeError("Missing 'provided' argument")
 
             config = context.config.with_package(info.module)
+            logger.debug("Registering adapter {0} for {1} => {2}".format(str(ob),
+                                                                         str(adapts),
+                                                                         str(provides)))
             config.registry.registerAdapter(ob, adapts, provides, settings.get('name', ''))
 
         info = self.venusian.attach(wrapped, callback, category='pyams_adapter',