--On Sonntag, 6. März 2005 13:00 Uhr +0100 Milos Prudek <prudek@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