[Zope] Write log file from script

Tino Wildenhain tino at wildenhain.de
Fri Oct 7 13:29:24 EDT 2005


Am Freitag, den 07.10.2005, 09:03 -0700 schrieb Dennis Allison:
> Depends upon what you want to do and how much access  you have.  For 
> debugging purposes I often use an external procedure
> 
> def debugWindow( data ):
>    fd = open('/tmp/debugWindow",'a')
>    fd.write( str(data))
>    fd.close()


Actually this is a bit dangerous if you dont lock
the file.

import zLOG

def log(self,message):
    zLOG.LOG("PythonScript", zLOG.INFO, message)


as external method should be enough.



More information about the Zope mailing list