The configuration of the logging is handled using a ZConfig component that's actually bundled with ZConfig itself on the Zope 2 head; it's in the package ZConfig.components.logger. This allows any project using ZConfig to use the same basic logging support; we actually have several projects using ZConfig outside the application server.
Cool. Okay, quick question for you...
I'm trying to set up some (normal python) logging so that run of the mill messages are send to a logfile while critical errors are sent via email to me. I got to:
logger = logging.getLogger('X2Y')
hdlr = logging.FileHandler(logfile)
formatter = logging.Formatter('%(asctime)s %(process)d %(levelname)s %(message)s')
if len(sys.argv)==2 and sys.argv=='debug':
hdlr = logging.SMTPHandler(*etc*)
formatter = logging.Formatter('%(asctime)s %(process)d\n\n%(message)s\n\n%(pathname)s line %(lineno)d.')
...but then couldn't figure out how to say that the SMTPHandler should only deal with messages that are critical.
Bringing this back on topic, I'd also be very interested in doing the same thing for Zope instances...
-- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce