Casey Duncan wrote:
It seems reasonable to me to single this one out since its so common.
I've been using the attached patch for a while... it provides a bit more information about exactly where the request went wrong, by marking the un-traversed segment of the URL. Cheers, Evan @ 4-am Index: lib/python/Products/SiteErrorLog/SiteErrorLog.py =================================================================== RCS file: /cvs-repository/Releases/Zope/lib/python/Products/SiteErrorLog/SiteErrorLog.py,v retrieving revision 1.11.4.1 diff -u -r1.11.4.1 SiteErrorLog.py --- lib/python/Products/SiteErrorLog/SiteErrorLog.py 16 Oct 2002 21:34:36 -0000 1.11.4.1 +++ lib/python/Products/SiteErrorLog/SiteErrorLog.py 7 Apr 2003 15:28:49 -0000 @@ -151,6 +151,10 @@ username = None userid = None req_html = None + try: + strv = str(info[1]) + except: + strv = '<unprintable %s object>' % str(type(info[1]).__name__) if request: url = request.get('URL', '?') usr = getSecurityManager().getUser() @@ -160,11 +164,13 @@ req_html = str(request) except: pass - - try: - strv = str(info[1]) - except: - strv = '<unprintable %s object>' % str(type(info[1]).__name__) + if strtype == 'NotFound': + strv = url + next = request['TraversalRequestNameStack'] + if next: + next = list(next) + next.reverse() + strv = '%s [ /%s ]' % (strv, '/'.join(next)) log = self._getLog() entry_id = str(now) + str(random()) # Low chance of collision