Pier Luigi Fiorini wrote:
Hello,
I'm developing a Zope application that uses a PostgreSQL connection and several ZSQL objects. People should log in using a Postgres user and ZSQL object should be executed by the user that's logged in. Multiple people can be logged at the same time. Unfortunately it is not possible because the same Postgres connection is used by all the ZSQL object. Is there a way to change the user executing a ZSQL query?


An alternative would be to log into the event.log some information (like the username, that's stored in the session) and the query source.

Your alternative is dead easy. zLOG (or, better, the Python logging module, for which zLOG is now a facade) is quite easy to use. You can even make your own log file to contain only such events.

                --jcc
--
"Building Websites with Plone"
http://plonebook.packtpub.com
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to