[Zope] ZSQL with different user

Pier Luigi Fiorini pierluigi.fiorini at yacme.com
Tue Dec 20 03:37:20 EST 2005


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.
-- 
YACME S.r.l.
Via del Mobiliere, 9 40138 Bologna
Tel: +39 051 538709
Fax: +39 051 532399
pierluigi.fiorini at yacme.com
www.yacme.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20051220/b180c004/attachment.bin


More information about the Zope mailing list