Re: infrae.wsgi questions

Sylvain Viollon <[email protected]> Thu, 22 Sep 2011 07:54:49 +0200
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
Op 21 sep 2011, om 16:53 heeft Andrew Altepeter het volgende geschreven:

> Hi Devs,
> 

   Hello,

> Bethel has added a few exceptions to our Silva which are cropping up in the
> new wsgi error log quite a bit -- they're drowning out the real errors.
> 
> It is possible to manually add ignored exceptions, by viewing the error log
> and using the form at the bottom.
> 

   For the moment, no,

> I was wondering if it is possible to permanently add ignored exceptions?
> For instance by using a product-config section in zope.conf or something?
> 

   I think a ZCML directive would be nice for that. An exception is a class, so that
would validate its path, and you could define it directly next to the code where you
defined the exception.

    I can surely add this.

> I also miss some of the extra reporting the Zope 2 error log object provided
> -- like full inspection of the request object's form, other, lazy and env.
> Could that be added to the error log?  Or is there some way to log to the
> zope 2 error log from infrae.wsgi?
> 

   No, and no.

   Zope error_log is a huge mess, exceptions travels through half the object stored in Zope
before getting there, loses half of the information we have about them in the process, 
and even if they are stored in memory, this do write in the database.

   And you cannot make decent error pages with the Zope error_log.

   After, we never got error_log entries from customer, but log that are written down on the filesystem
instead. We never had the error_log information, as in ZEO setup, you need to find the client first.

   If you have the error from the filesystem log, you have almost no information, like no path,
no browser information, referrer or user or just anything. The information you see through Zope
with the infrae.wsgi errorlog is exactly the same you have on the filesystem log, logged, using
Python logging (so you could configure it to go through syslog and merge all the feeds of your ZEO
clients on one server, configuration done in paster configuration file).

   We probably can add a more verbose mode for logging that would completely dump the request with
it.


> When rendering a code source, and the source raises an exception,
> SilvaExternalSources catches that exception.  It logs it to the Zope2
> error_log.  Now we have two logs to look at per zope node.  Is it possible
> to either:
> 1) have any error logged to the zope2 error_log also go to the infrae.wsgi
> error log?
> 2) log caught exceptions to the infrae.wsgi error log?



   In 3.0 code sources errors are friendly logged in the same log than infrae.wsgi,
with a complete list of parameters and default values given to it, document and version
informations.

   Regards,

   Sylvain,

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