[Zope] logging inside TTW script

Andreas Jung lists at andreas-jung.com
Sun Mar 6 07:07:04 EST 2005



--On Sonntag, 6. März 2005 13:00 Uhr +0100 Milos Prudek <prudek at bvx.cz> 
wrote:

> Hi,
>
> How can I log events that take place inside a TTW Python Script, and log
> them immediately?
>
> I have a script that converts a few hundreds of objects in a "for" loop.
> One of these objects causes my script to fail. I need to find out which
> object it is. In other words, which iteration.
>
> TTW scripts of course runs is a single transaction for Zope, and if
> anything fails, Zope will discard the whole transaction and not tell me
> which iteration the problem was in.
>
> If I put logging in the TTW script, it will not help, because the logging
> itself will be discarded too!

Why should logging within a PythonScript (e.g. through zLOG) be discarded?
The zLOG engine is *not* tied to transactions.

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050306/88bd9f6a/attachment.bin


More information about the Zope mailing list