[Zope-dev] Logging for ZScheduler?

Loren Stafford lstaffor@dynalogic.com
Wed, 14 Jun 2000 19:04:25 -0700


I need some advise for designing a flexible system for logging the
activities of scheduled events.

One of the motivations for developing ZScheduler was to have a platform
independent means for scheduling Zope tasks. The lask of a cron on Windows
platforms was a part of the problem. ZScheduler achieves this independence
by using Python's threading.Wait method for all time measurement.

But ZScheduler also needs to be ISP independent. That is, you should have
complete scheduling capabilities for your cohosted Zope applications without
having to call up the ISP and ask for system configuration changes.
ZScheduler partially achieves this level of independence, by eliminating the
need for cron.

But, as I installed ZScheduler under my personal account at CodeIt
Computing, I realized that an ISP-dependence still exists, and it has
nothing to do with cron -- it has to do with the configuration of the
Scheduler's logging activity. When you have a Scheduler executing
applications tasks on your website behind your back, you definitely want it
to keep a log of what it is doing. For ZScheduler, I chose to use the
STUPID_LOG_FILE feature of Zope. However, STUPID_LOG_FILE is an environment
variable. Zope accounts at CodeIt (and probably at any other Zope ISP)
cannot set environmet variables. And if they could, is anyone certain how
STUPID_LOG_FILE would behave in their custom cohosting adaptation of Zope?

So, I need a more flexible structure for the logging aspect of ZScheduler.
While the ZEvent class is subclassable by users, I haven't made the
Scheduler class instantiable -- there should be only one instance -- so it's
not subclassable either, and therefore you can't override its logging
method. Do you see the problem?

Having little experience with Python and OO applications, I don't know how
others solve this problem. Can you give me any pointers?

Perhaps I've identified a typical application of RIPP?

-- Thanks
-- Loren