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" <[EMAIL PROTECTED]>
To: "Loren Stafford" <[EMAIL PROTECTED]>
Cc: "Loren Stafford" <[EMAIL PROTECTED]>; "zope-dev"
<[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
> Senior Systems Alchemist               Play: [EMAIL PROTECTED]
> Computer Science, RMIT University
>
>
> _______________________________________________
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> 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 )
>



_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )

Reply via email to