# HG changeset patch # User Thierry Florac # Date 1528724988 -7200 # Node ID 3c93821dffeb08ae6541f25ee639fc189d83cd08 # Parent 918e2754142953d554e9163c5a659981eded1917 Added debug logs diff -r 918e27541429 -r 3c93821dffeb src/pyams_viewlet/viewlet.py --- a/src/pyams_viewlet/viewlet.py Mon Jun 11 15:44:10 2018 +0200 +++ b/src/pyams_viewlet/viewlet.py Mon Jun 11 15:49:48 2018 +0200 @@ -14,6 +14,9 @@ # import standard packages +import logging +logger = logging.getLogger('PyAMS (viewlet)') + import venusian # import interfaces @@ -102,6 +105,8 @@ bases = bases + (ViewContentProvider,) new_class = type('' % settings.get('name'), bases, cdict) + logger.debug("Registering content provider {0} ({1})".format(settings.get('name'), + str(new_class))) config = context.config.with_package(info.module) config.registry.registerAdapter(new_class, (settings.get('context', Interface), @@ -188,6 +193,8 @@ bases = bases + (Viewlet,) new_class = type('' % settings.get('name'), bases, cdict) + logger.debug("Registering viewlet {0} ({1})".format(settings.get('name'), + str(new_class))) config = context.config.with_package(info.module) config.registry.registerAdapter(new_class, (settings.get('context', Interface),