[Zope-dev] Can I get at the REQUEST from inside a Response instance?
skip@mojam.com (Skip Montanaro)
skip@mojam.com (Skip Montanaro)
Thu, 15 Apr 1999 16:42:42 -0400
I have this little mod to Response._traceback that mails me the traceback:
def _traceback(self,t,v,tb):
if t != "NotFound":
import traceback, os
msg = os.popen('/usr/sbin/sendmail -t', 'w')
msg.write('To: skip@musi-cal.com\n')
msg.write('Subject: Z traceback\n\n')
traceback.print_tb(tb, None, msg)
msg.write("%s: %s\n" % (t, v))
msg.close()
tb=self.format_exception(t,v,tb,200)
tb=join(tb,'\n')
tb=self.quoteHTML(tb)
return "\n%s\n%s\n%s" % (_tbopen, tb, _tbclose)
Only problem at this point is I'd like to also include the inputs. I don't
see any request information floating around the Response class. Can I pick
it up from somewhere? I'm using raw ZopeHTTPServer, not Zope proper.
Thx,
Skip Montanaro | Mojam: "Uniting the World of Music" http://www.mojam.com/
skip@mojam.com | Musi-Cal: http://www.musi-cal.com/
518-372-5583