In Python Zope, how do I dump the error_log to the browser?

60 views Asked by At

We are a big org and we use Python Zope. We have naturally two versions: prod and dev. In production I understand due to security reasons we should not show error log to end users, but how do I do that for dev? It is very cumbersome to check the error log manually every time I get an internal server error.

Can I dump the error log directly onto the browser?

Zope v. 4.6.2
Python v. 3.8.0b2 (default, Jul 9 2019, 16:47:40) [GCC 4.8.5]

1

There are 1 answers

3
Jürgen Gmach On

As far as I remember, Zope is using Products.SiteErrorLog for logging errors.

Afair on startup, Zope created a SiteErrorLog on startup, which you could customize. Back then I customized it in such a way that admin accounts could view the traceback in the browser, both for staging and production environments.

On my local developer box, I started Zope in foreground mode, which directly printed all errors to my terminal, without the need to look in logs.

If you cannot manage to configure the error log, I would suggest to create an issue at https://github.com/zopefoundation/Products.SiteErrorLog or ask your question again at https://community.plone.org/ (tag: Zope) which is the most active Plone/Zope community online.