[Zope-dev] Patch for more meaningful SiterErrorLog

Maik Jablonski maik.jablonski@uni-bielefeld.de
Sun, 06 Apr 2003 22:17:39 +0200


Hello,

I would like to introduce a small change into the great SiteErrorLog 
introduced in Zope 2.6.x. If you visit the error_log in the ZMI, you'll 
see many entries like:

21:42:06   	  Anonymous User (None)   	  NotFound: <TABLE BORDER="0" 
WIDTH="100%"> <TR VALIGN="TOP"> <TD WIDTH="10%"

The "Exception Value" for the ExceptionType "NotFound" is usually not 
very meaningful. Much more useful would be an entry like:

21:42:06   	  Anonymous User (None)   	  NotFound: 
http://localhost:8080/url/not/found

The only thing which needs a little patch is 
python/lib/Products/SiteErrorLog/www/main.pt:

87c87,88
<       tal:content="python: len(value) < 70 and value or value[:70] + 
'...'">
---
 >       tal:content="python: test(entry['type']=='NotFound',
 >       entry['url'], len(value) < 70 and value or value[:70] + '...')">

Any thoughts or comments?

Cheers, Maik