Re: [Zope-CMF] [dev] RFC: logging/reporting framework for GenericSetup
Jens Vagelpohl wrote: There could be a "multiplexer" that logs to the standard Zope event log *and* keeps the messages in a memory buffer to be displayed in the browser. This could be done in a separate class or a logging API could be added to ISetupContext. Should be easy to do, really. Well, this is all supported by the logging module ;-) You can define a new log handler just for the duration of the process and then remove it. Have a look at MailingLogger's SummarisingLogger for ideas. Give it a go and let me know where the code is if you want me to take a look, I've got to know and love python's logging module quite well ;-) cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
Re: [Zope-CMF] [dev] RFC: logging/reporting framework for GenericSetup
On 15 Nov 2005, at 14:24, yuppie wrote: The notes should be logged *and* used for reporting in the ZMI. Implementation: I'm no logging expert, so I might well be missing something. The state of the art seems to be using the Python logging package (PEP 282). Is it possible to use that framework for reporting as well? It doesn't look like that. Replacing the 'note' method in ISetupContext with a more logger like API and sending the notes to the Python logger *and* to TTW reports might be the way to go. There could be a "multiplexer" that logs to the standard Zope event log *and* keeps the messages in a memory buffer to be displayed in the browser. This could be done in a separate class or a logging API could be added to ISetupContext. Should be easy to do, really. jens ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests
[Zope-CMF] [dev] RFC: logging/reporting framework for GenericSetup
Hi! GenericSetup is quite silent. The return values of the setup handlers and import context notes are ignored. The only feedback is a small manage_tabs_message. Goals: Setup handlers should give detailed feedback. Each note should include a logging level and a setup handler ID. The most common notes might be: - Warnings if handlers skipped XML fragments on import or objects on export. - Info about changes made on import or XML files created on export. The notes should be logged *and* used for reporting in the ZMI. Implementation: I'm no logging expert, so I might well be missing something. The state of the art seems to be using the Python logging package (PEP 282). Is it possible to use that framework for reporting as well? It doesn't look like that. Replacing the 'note' method in ISetupContext with a more logger like API and sending the notes to the Python logger *and* to TTW reports might be the way to go. Timeframe: We need soon a stable API to encourage the authors of setup handlers to use that API. The actual reporting and logging can be implemented later. Cheers, Yuppie ___ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests