Pier Luigi Fiorini wrote:
Alle 18:42, lunedì 19 dicembre 2005, hai scritto:

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.

I know _how_ to use zLOG. I just don't know how to log the query source.
Is there some documentation about these things. I can find only documentation about making things like a simple form which is not so useful because you can learn it in some days.

That depends. What do you mean by "query source"?

                --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