Added logging
authorThierry Florac <tflorac@ulthar.net>
Sat, 17 Feb 2018 15:54:32 +0100
changeset 35 8bf32be8b05b
parent 34 0926de6c16f4
child 36 f012effb18c7
Added logging
src/pyams_alchemy/engine.py
--- a/src/pyams_alchemy/engine.py	Thu Feb 08 08:51:30 2018 +0100
+++ b/src/pyams_alchemy/engine.py	Sat Feb 17 15:54:32 2018 +0100
@@ -208,6 +208,7 @@
     """
     if request is None:
         request = check_request()
+        logger.debug("Checked request {0!r}".format(request))
     if not alias:
         alias = engine
     session_data = get_request_data(request, REQUEST_SESSION_KEY, {})
@@ -228,6 +229,7 @@
         if session is not None:
             session_data[alias] = session
             set_request_data(request, REQUEST_SESSION_KEY, session_data)
+    logger.debug("Using SQLAlchemy session {0!r}".format(session))
     return session