"Phillip J. Eby" <[EMAIL PROTECTED]>
> 
> At 01:58 PM 6/15/00 +1000, Stuart 'Zen' Bishop wrote:
> >
> > Its not a problem with ZScheduler, it a problem that no one has
> > written a plug-in logging system that is good enough for what
> > you are trying to do. The existing zLOG API is fine (well - it
> > could be better), but just needs someone to write the relevant
> > modules. Hmm... I think I'll
> > add a section to the Interfaces Wiki...
> 
> Hm...  this could work well with Observer->Observable, too.
> Imagine firing ObservableEvents, and subscribing a "Log" object
> to them...

Ayup, logging is one of the classic instances of that pattern. The
problem with using Observer for logging, especially in a fine-grained
way, is that the dependency arrows point the "wrong way" -- the logger
object needs to register as an Observer of many Subjects, but has
no good way to find them all.  The typical solution is to add an
intermediate observer to all the containers, who watches the add
and remove operations, and then either notifies the logger of new
subscriptions it should perform, or performs them on behalf of the
logger.

Tres.
-- 
===========================================================
Tres Seaver                            [EMAIL PROTECTED]
Digital Creations    "Zope Dealers"    http://www.zope.org

_______________________________________________
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