Any ideas on this? Shall I just submit a patch to make what I'm talking about clearer, and see if it flies? [0.7a3 is going to have to be code named qui-patchy if I keep this up!] Jason > -----Original Message----- > From: quixote-users-bounces+jsibre=chironsys.com@mems-exchange.org > [mailto:quixote-users-bounces+jsibre=chironsys.com@mems-exchange.org]On > Behalf Of Jason Sibre > Sent: Monday, February 23, 2004 1:17 AM > To: quixote-users@mems-exchange.org > Subject: [Quixote-users] publisher.log_request() > > > I noticed tonight that due to the location of the call to > log_request(), not > all requests are logged using Quixote's built-in logging > functionality (this > doesn't apply if you're using Medusa's logging, or Apache's, etc) > 404s, for > example, or anything else which results in an exception that > makes it out of > the publishable, even if it's later handled by a _q_exceptionhandler, will > prevent that particular request from being logged by Qx. > > This is because the self.log_request() call is in process_request(), just > after the call to try_publish(). If an exception is raised by try_publish > (which is where TraversalError, AccessError, and a host of others > would come > from), it isn't caught until it makes it back out to publish, after > essentially skipping the log_request() call in process_request(). > > After looking at things, and noticing how > medusa_http.QuixoteHandler.continue_request() calls directly into > process_request() bypassing publish(), and publish()es 'try/except/except' > block is duplicated there, I think some refactoring may be in order. It > looks like moving the try/except/except block from publish() to > process_request() will improve things, allowing the call to > log_request() to > happen after the t/e/e block. > medusa_http.QuixoteHandler.continue_request()'s own t/e/e block could then > go away (or at least be replaced with a simpler one). > > Interestingly enough, based on the comments in the code, process_request() > is where "exceptions will be handled" ... > > Does anyone know if the t/e/e block used to be in process_request() and if > there was a good reason for moving it out? The oldest copy of Quixote I > have is .5.1, and the t/e/e block is in publish(), just as it is now. > > Anyone have any ideas on this? > > Jason > > > _______________________________________________ > Quixote-users mailing list > Quixote-users@mems-exchange.org > http://mail.mems-exchange.org/mailman/listinfo/quixote-users >