Hi, I'm starting to prepare an extension for the SiteErrorLog that will allow you to store the detailed view of an Exception as a file on the server (directory will be configurable from zope.conf). I'm adding this feature because we have consulting situations where it is easier to transport a file on the server to us, than from the workstation we are using. The "copy to error log" isn't exactly the same. Also it doesn't need to be done for *every* exception, but I like to take a "snapshot" of single pathological exceptions. If you have any comments to this, I'd be happy to include those in my thoughts. I'm starting to prepare that on a branch for Zope 2.8. Cheers, Christian -- gocept gmbh & co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - ct@gocept.com - phone +49 3496 30 99 112 - fax +49 3496 30 99 118 - zope and plone consulting and development
Replying to myself ... :) See the branch "ctheune-extending_error_log". I checked my changes in. Any feedback is welcome. If no complaints come around, I'm going to put that on the trunk after a week. Cheers, Christian -- gocept gmbh & co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - ct@gocept.com - phone +49 3496 30 99 112 - fax +49 3496 30 99 118 - zope and plone consulting and development
Christian Theune wrote:
Replying to myself ... :)
See the branch "ctheune-extending_error_log". I checked my changes in. Any feedback is welcome. If no complaints come around, I'm going to put that on the trunk after a week.
Haven't had a look, but since it's related, I'll pipe up. I'd love to see all the useful information shown in the error log be storable somewhere persistent, rather than just the rather puny copy-to-log functionality that currently exists. It sounds like you're making this happen by storing things on the file system, that so? In any case, here's another idea: Make the storage of information to the log pluggable. One obvious way that I can see this is to have another python logger (say called error_log, rather than event) set up which gets the detailed info passed to the log entry format string (you'll need to write a custom Formatter to do this, but it's not hard, I have an example if you're interested). Where and how these entries are logged is then configurable in Zope.conf (well, once this is fixed http://zope.org/Collectors/Zope/1613 ) Not sure I'm making much sense, am I? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Am Mittwoch, den 12.01.2005, 20:10 +0000 schrieb Chris Withers:
Haven't had a look, but since it's related, I'll pipe up.
I'd love to see all the useful information shown in the error log be storable somewhere persistent, rather than just the rather puny copy-to-log functionality that currently exists. It sounds like you're making this happen by storing things on the file system, that so?
Jup. I'm writing a file for a selected entry called "Exception-<error_log_id>" containing a textual representation of the whole error log entry (not just the traceback).
In any case, here's another idea: Make the storage of information to the log pluggable. One obvious way that I can see this is to have another python logger (say called error_log, rather than event) set up which gets the detailed info passed to the log entry format string (you'll need to write a custom Formatter to do this, but it's not hard, I have an example if you're interested).
Where and how these entries are logged is then configurable in Zope.conf (well, once this is fixed http://zope.org/Collectors/Zope/1613 )
Would that really be needed? I'm pretty happy with the solution as is. Cheers, Christian -- gocept gmbh & co. kg - schalaunische str. 6 - 06366 koethen - germany www.gocept.com - ct@gocept.com - phone +49 3496 30 99 112 - fax +49 3496 30 99 118 - zope and plone consulting and development
Christian Theune wrote:
Jup. I'm writing a file for a selected entry called "Exception-<error_log_id>" containing a textual representation of the whole error log entry (not just the traceback).
Good to know :-)
In any case, here's another idea: Make the storage of information to the log pluggable. One obvious way that I can see this is to have another python logger (say called error_log, rather than event) set up which gets the detailed info passed to the log entry format string (you'll need to write a custom Formatter to do this, but it's not hard, I have an example if you're interested).
Where and how these entries are logged is then configurable in Zope.conf (well, once this is fixed http://zope.org/Collectors/Zope/1613 )
Would that really be needed? I'm pretty happy with the solution as is.
No, I guess it's YAGNI, but I would like to see more types of logs be configurable through zope.conf, and it would be nice to be able to pipe this file by mail in a configurable manner, so just an idea... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Withers -
Christian Theune