[Grok-dev] zope.app.appsetup and error reporting utility

Sylvain Viollon sylvain at infrae.com
Mon Mar 4 10:18:03 UTC 2013


Op 4 mrt 2013, om 10:35 heeft Jan-Wijbrand Kolman het volgende geschreven:

> Hi,
> 
> tl;dr: we could perhaps get rid of the dependency on zope.app.appsetup, or at least its configuration for vanilla grok-based apps by doing the registrations in the grok package. And: introducing a much simpler error reporting utility. Opinions? Interest?
> 
> 

   +1, even if I don't use it.

> Grok-based applications depend on zope.app.appsetup. This package essentially registers several event handlers, subscribing to the application start events and database opened events. It ensures there is a root folder when a new database is created, it adds a session data container and sets up an error reporting utlity and some more stuff.
> 
> It's currently not easily possible to *not* configure zope.app.appsetup in a grok-based application - so it is hard to override the components.
> 
> Furthermore the error reporting utility that is registered, implemented in zope.error, is a it rather "heavy-weight".
> 
> My current thinking is:
> 
> * Try to remove the zope.app.appsetup dependency, by:
> 
> * have grok package do the necessary bootstrap registrations for:
> 
> * a root folder
> 
> * a session data container
> 
> * an error reporting utility, that:
> 
> * is *not* a persistent, local utility storing exceptions for TTW introspection, but:
> 
> * merely logs exceptions, where the log level for various exceptions is configurable.
> 
> This error reporting utility could go in grokcore.error.


   Error reporting should be pluggable, and you should have the possibility to have different backend, one or multiple used at once.

   I experimented with this in infrae.wsgi, the idea is to have the possibility to log in more complicated systems, like sentry, while keeping the maximum of information on your request, without monkey patching.


   Regards,

   Sylvain,


-- 
Sylvain Viollon -- Infrae
t +31 10 243 7051 -- http://infrae.com
Hoevestraat 10 3033GC Rotterdam -- The Netherlands





More information about the Grok-dev mailing list