[Zope-dev] Patch for more meaningful SiterErrorLog

Casey Duncan casey@zope.com
Mon, 7 Apr 2003 08:59:27 -0400


It seems reasonable to me to single this one out since its so common.

-Casey

On Sunday 06 April 2003 04:17 pm, Maik Jablonski wrote:
> Hello,
>=20
> I would like to introduce a small change into the great SiteErrorLog=20
> introduced in Zope 2.6.x. If you visit the error_log in the ZMI, you'll=
=20
> see many entries like:
>=20
> 21:42:06   =09  Anonymous User (None)   =09  NotFound: <TABLE BORDER=3D=
"0"=20
> WIDTH=3D"100%"> <TR VALIGN=3D"TOP"> <TD WIDTH=3D"10%"
>=20
> The "Exception Value" for the ExceptionType "NotFound" is usually not=20
> very meaningful. Much more useful would be an entry like:
>=20
> 21:42:06   =09  Anonymous User (None)   =09  NotFound:=20
> http://localhost:8080/url/not/found
>=20
> The only thing which needs a little patch is=20
> python/lib/Products/SiteErrorLog/www/main.pt:
>=20
> 87c87,88
> <       tal:content=3D"python: len(value) < 70 and value or value[:70] =
+=20
> '...'">
> ---
>  >       tal:content=3D"python: test(entry['type']=3D=3D'NotFound',
>  >       entry['url'], len(value) < 70 and value or value[:70] + '...')=
">
>=20
> Any thoughts or comments?
>=20
> Cheers, Maik
>=20
>=20
>=20
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -=20
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope )
>=20