Added log
authorThierry Florac <thierry.florac@onf.fr>
Thu, 15 Mar 2018 09:22:02 +0100
changeset 288 735cb26095e8
parent 287 d23f56adcb92
child 289 2c2c6d23a212
Added log
src/pyams_skin/skin.py
--- a/src/pyams_skin/skin.py	Wed Mar 14 09:36:29 2018 +0100
+++ b/src/pyams_skin/skin.py	Thu Mar 15 09:22:02 2018 +0100
@@ -13,6 +13,8 @@
 __docformat__ = 'restructuredtext'
 
 # import standard library
+import logging
+logger = logging.getLogger('PyAMS (skin)')
 
 # import interfaces
 from pyams_skin.interfaces import ISkin, ISkinnable, IUserSkinnable, SkinChangedEvent
@@ -96,6 +98,7 @@
         if skin is not None:
             ifaces.append(skin.layer)
             directlyProvides(request, *ifaces)
+            logger.debug("Applied skin {0!r} to request {1!r}".format(skin.layer, request))
 
     _apply(request, skin)
     if isinstance(request, PyramidPublisherRequest):