[Zope] Write log file from script

Brian Sullivan briansullivan at gmail.com
Fri Oct 7 12:33:48 EDT 2005


On 10/7/05, Dennis Allison <allison at shasta.stanford.edu> wrote:
>
>
> 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()
>
> and look at the output with
>
> tail -f /tmp/debugWindow
>
> Or, you can use the same approach to write to syslog using the Python
> logging module
>
> Or you can piggyback into the Zope logging mechanism--see the sources for
> that exercise.
>
> I find the external procedure approach to be useful in its simplicity

 OK -- thanks to those that replied (many with a similar solution).
 I do have access to the server (Win2000 in my case) so I can pretty well do
anything I want.
 It comes back now -- I did something like that but then called it through a
gateway Python script that allowed me to turn off all logging in one spot
easily (by modifying the script) in case I wanted to leave the debug
statements there temporarily and not incur the expense of a huge log file.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20051007/0e2ec1a6/attachment.htm


More information about the Zope mailing list