[Zope-dev] Logging for ZScheduler?

Loren Stafford lstaffor@dynalogic.com
Mon, 19 Jun 2000 19:34:53 -0700


I've created a STUPID_LOG helper product, called FrozenLogger, that does the
minimum necessary for me to create a STUPID_LOG_FILE at my account at CodeIt
Computing (where lack of telnet keeps me from setting environment
variables).

http://www.zope.org/Members/lstaffor/FrozenLogger

The core of this is:

 from Globals import data_dir
 if os.environ.has_key('STUPID_LOG_FILE'):
    pass
 else:

os.environ['STUPID_LOG_FILE']=string.join((data_dir,'FrozenLogger.txt'),'/')

It works for me at CodeIt, but I doubt if it's general enough for some of
the Zope virtual hosting schemes I've read about here. Let me know how your
mileage varies.

-- Loren

----- Original Message -----
From: "Stuart 'Zen' Bishop" <zen@cs.rmit.edu.au>
To: "Loren Stafford" <lstafford@icompression.com>
Cc: "Loren Stafford" <lstaffor@dynalogic.com>; "zope-dev"
<zope-dev@zope.org>
Sent: June 15, 2000 01:57 PM
Subject: RE: [Zope-dev] Logging for ZScheduler?


> On Thu, 15 Jun 2000, Loren Stafford wrote:
>
> > Aha! Even tho a cohosted account might not be able to modify the source
of
> > the Zope implementation directly, installing a CustomLog product could
do so
> > indirectly, by importing ZLogger and modifying the loggers tuple. To
know
> > where to write the log file, CustomLog would have to either know or be
> > configurable enough to adapt to the ISP's Zope configuration. I suppose
an
> > absolute path property would be suffient. An ISP could preconfigure and
> > preinstall the CustomLog product for all users, or each user could do
it.
>
> Dump it Globals.data_dir unless a given environment variable is set.
>
> (Sorry bout the double reply)
>
> --
> Stuart Bishop                          Work: zen@cs.rmit.edu.au
> Senior Systems Alchemist               Play: zen@shangri-la.dropbear.id.au
> Computer Science, RMIT University
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>